Sounds more like poor fuel delivery. If the problem were rain soaked electrics, it would take a couple minutes to restart after the engine heat dried it all out. If the ignition module were failing, it would probably not restart for several minutes after it cooled down.