1997 Ford F-150 Electrical Problems

Hello, I have listened to your show for many years and now have a problem I hope you can help me with. I drive a 1997 Ford F-150, 4x4 extended cab, long bed, and 5-speed standard with 147,000 miles on it. It’s in decent shape as well. Starting last fall, after any type of precipitation occurs (snow or rain), there are electrical shorts or outages where the electrical windows, dome light and most importantly, the 4 wheel drive do not work. The wipers will not work as well. However, the wipers and windows will sometimes work if I turn off the motor and turn the key back to the on past the off position. Not always though. I live in Montana and use it for the ice and snow from time to time. The 4X4 light doesn’t even show up in the dash console even after I push the 4 wheel stick down to engage the 4 wheel high or low. After one day to three days later, the windows and dome light generally come back on followed by the 4 wheel drive. Sometimes when these are starting to come back on, I hear a slight click down by the fuse box. Once everything is functioning again, I do not hear the clicking anymore. I?m wondering if water is getting inside the electrical somewhere under the hood and causing this problem. Do you have any idea what is happening and what I can do to fix this problem? Thank you for your time and consideration.