When the motor doesn't respond to the throttle, are all the battery gauge LEDs on the throttle lit up as normal or do they stop working as well?
If the fault only occurs when it's wet, it could be due to water inside one of the connectors, or even inside the controller housing itself:
Check out
this post for more details of a very similar fault.
I tightly wrap a piece of insulation tape around the main 8/10 Pin connector joint to ensure it cannot work loose and come apart
and to prevent water getting inside.
However, if the motor running by itself is
not being caused by water, it could be a poor connection somewhere on the ground wire circuit between the throttle and the controller.
If the throttle is working properly, with the bike powered up
and the wheel raised off the ground, try gently wiggling the wiring and connectors etc. between the throttle and the controller to see if you can reproduce the fault.
If the fault reoccurs, you may be able to locate the precise position on the wiring and hopefully locate the cause of the problem.
Alan