I've been using WD-40 on electrical connectors since I was knee high to a grasshopper ... learned it from my Dad, a REAL electrical engineer (not like me, who just fiddles with things).
But ... I only spray it on the specific metal connector(s) in question, not everything in site. I’d think that spraying the whole engine compartment would be a bit risky. If you coat everything, you might give some electrical components a new path to ground resulting in its failure. Witness the time I accidentally got some inside a distributor cap (you DO remember those pesky thing, don’t you?), which caused the spark on several cylinders to travel to ground instead of to the spark plugs. It didn’t run so hot after that.
As Groupset pointed out in his tar example, WD-40 appears to be a sort of de-greaser and can break down the heavier oils and greases that are used to lubricate vital parts of your car. WD-40 also has a penetrating ability, meaning that when you spray it on the surface of an object, it seems to seep and find its way into any cracks or crevasses and into the insides of the thing. That’s great when you want to lube the bearings inside something that you can’t get open, but I’d hate to blow a few cans into your engine compartment, and end up washing the grease out of all your steering linkages (bad example as they are probably sealed) below.
Use the laser scalpel, not the shotgun, to fix things my young sea bass.
---------------------------------------------------------------------
’90 4Runner – great, but inadequate for a family of 5
’86 Civic – bye, bye my little old friend
’02 GG Odyssey EX-L-RES w/all the fixings – hello, my new best friend
tnuckels