Thinking of the waterlogged mechanic being "optional" in builds gave me an idea, but perhaps let it be possible to "force" them to connect, but only if desired. If you were to place an iron bar, wall, or fence on the block underneath or above its desired location, it will only automatically connect the same type of block. However, if you place an iron bar on a wall or fence, it will force them to meet at the edge of the block spaces, as well as automatically connect to surrounding blocks of both types (the targeted block and the placed block). That is, the iron bar will connect to the side of the targeted stone wall and any other stone walls and iron bars around it, but not fences (fences can be placed to force connection afterwards).
Here, now you can manipulate bars/walls/fences more cohesively, while still allowing the option for intentional gaps for whatever purpose (aesthetic or function).