The main idea is to keep all rain water out of the electrical boxes...
If running just outdoor romex outside to a junction box, don't run the wire down the wall and then into the box. Instead run the wire down, then back up into the box. This is called a "drip loop". Use a weatherproof connector (has rubber grommet inside to seal out water) screwed into a weatherproof box.
You might be able to see outside wiring work done elsewhere where the wires run down, then back up to go into the building. These are drip loops. Water drips down to bottom of loop instead of into building.
I don't quite understand what you are doing exactly. But basically for outside, use outdoor rated wiring only (if exposed), use outdoor sealed boxes, and use outdoor connectors for the boxes. If it looks like water might get into something, use caulk. (Around here it rains "sideways" sometimes, so I do this even if under overhanging roof...)
I also caulk between the outside electrical box and the building so water will not get into screw holes or whatever. Then I caulk where the wire goes into the building. This is to keep wind from blowing in through the hole (heating is not cheap these days!)