The center of the element

This is a very common issue in Dynamo.

Nesting the element will generally not work with a group, because the only type of instance-based parameter which can have different values for groups is TEXT-Type parameters. Maybe there are also others, but I know that BOOLEAN-Typ parameters do not allow to be different across groups.

You could use dynamo to fill-out a text parameter in order to identify those groups, but you will still have to change the groups. I assume you have rooms with similar / same fit-outs, but the boundary walls are not always the same material.

This is a group-management issue.

Not sure if there is an option to exclude group-members with dynamo nodes, but if there is, you could also use that to exclude plugs in masonry walls.

Otherwise, you could also use a script to place the elements where the collisions occur, and cross-write the ElementIDs in order to keep them synched. It’s not a great strategy, because if you use it too often, you need to remember to keep the elements synched. If you can use revit built-in functionality (namely, nesting an element and assigning a visibilty parameter) then it is much easier to maintain locations as things change.

Working with groups is Dynamo is not simple.