The reason it works with the wires connected is that you are putting inductance in series between the ESP module and the rest of the circuit. Stop pissing around and just add capacitors to the board where I told you. Solder on the back of the board for the smaller capacitors, from vcc to ground.
Try soldering the ESP so that it is turned off the board.