are those optocouplers? if so you already have two grounds on each.
one is the cathode of the led, the other is the GND for the logic output.
so what you have marked as GND should be the same one that goes to the MCU.
Thus you don't need to join the two grounds and you can keep them isolated. If...