I usually use a script property for this, with a hashed name that you can check just like a physics group. You can have as many different names as you want, and in the long run I think it is easier to manage than a lot of physics groups. (you don’t have to update all of your collision objects every time you add a new one, etc.)
If you need one object to be in multiple groups then this won’t work. In that case I would make a small lua module to store the list of groups for each object. Just a table keyed by object ID with a list of groups. Each object can add their list to the module on init and remove it on final, and any other object can simply get the target object’s ID and get it’s group list from the module.
I tend to avoid back-and-forth messages. Each message has a performance cost that is higher than calling a function or accessing a table. Also they don’t happen immediately, and can theoretically spill over into the next frame if you have too many of them.