It might be able to realize. When an object is mirrored, at least one of the coordinate (xmax,ymax and zmax) will be flipped. if so, you can rotate the object 180 deg, and shift it.
For example, rotate am object 180deg and shift -2e-6 along x.
setnamed("object_name","rotation 1", 180);
Below are triangles, the right one is the original, and the left one is rotated and shifted.
When you say connect, do you mean add them into a group. yes, it is also doable: addstructuregroup - Script command
There are related script. Please try. If you have question using script, please write a new post.