Hi,
there are many different optocouplers, there are many different transistors, there are many different circuits.
We don´t know what´s hidden inside the blue boxes.
So...with all this unknown...how can we help?
Wire selection according:
* expected voltage drop (also depends on circuit)
* expected timing and waveform (also depends on circuit)
* impedance controlled signaling? (... circuit)
* possible sources of noise
* coupling of noise (capacitive, magnetic)
* noise frequency
* noise immunity of circuit (.. circuit)
*****
If you need more details, then please show a schematic with standard symbols. Hand drawn is O.K.
Klaus