I've thought of another cause of the problem: Normally, as a safety precaution, the controller needs to see zero from your torque sensor before it'll give power. It's possible that water in it is causing it to give a no-load signal above the threshold. Try powering up your bike, and while it's switched on, disconnect and reconnect the torque sensor. Be careful because the motor might start on re-connection. If it does, that's the problem.
Just had another idea if that doesn't work. Assuming that the spare 4-way connector is for a throttle with LEDs, we need to confirm that the yellow has battery voltage on it, so could you measure the voltage between the yellow and the black - being careful not to touch the other pins with your probes. It might be easier to stick them up the back of the connector. If you get about 26v there, then the green is the throttle signal and red 5v. You should confirm 5v between red and black. If you don't get those voltages, report back what you do get.
if you then join the green and red wires, the motor should give full power like you've opened the throttle fully. Make sure that the wheel's off the ground unless you want to chase after your bike. The easiest way to do it is to scrape a bit of insulation off the wires to touch them together unless you know how to release the pins from the connector by pushing back the barb with a needle.
This test should determine whether it's your torque sensor that's faulty. If it is, all you need is a throttle to get going again.