This would be a question for the Wildfly forum.
I believe you can either use a different profile or use property substitution.
You have to use 2 different profiles: one for the LOCAL and another for the REMOTE grouping-handler.
Or, if that's the only difference between your 2 nodes, you can use an expression to define the grouping-handler type:
and use system properties to distinguish between your 2 nodes.