If you want to disperse water and keep condensation out of an engine bay, a silicon/PTFE spray will do the job effectively. If you want to clean low-voltage or low-current connectors, propanol and a toothbrush works well.
WD40 is petroleum based, so rots rubber and is also inflammable.
While I still have a can or two, my preference is also silicon spray. The
cheapest way to buy it is to look for "Silicon Mold Release Agent". Basically,
silicon grease in an aerosol.. Fixes the old style distributor caps for good and
also prevents electrolytic corrosion in multipin auto connectors...