the distributor cap is supposed to have a gasket. I would give the gasket a coating of silicone dielectric grease . also on the plug wire boot ends I would place some of the grease inside the boot..
I have a boat with a distributor cap. I place the grease on the cap base to keep out the mositure. works good.
most likely the cap contacts are jumping to each other with the mositure this will cause the engine to miss fire etc on cold crank.