WD40 stands for "Water Displacement, recipe #40". It's technically NOT a lubricant. It displaces water and dries. I'd lean more towards "CorrosionX" (which now offers a gun lubricant) for corrosion protection. This was originally developed for Boeing, to keep electronic components from corroding. The marine salvage/repair industry in my area is a big fan of the stuff. Boats, raised (after sinking) from salt water, get hosed with it (back of the dash panel), as well as the electrical connections. Often, they're able to salvage the items on the dash board. I used it for any/all wiring tasks for my motorcycle/automotive needs.
Anything threaded, especially between dissimilar metals (aluminum/steel), I use CRC Assembly Lube with moly/graphite. Especially on my motorcycle. I've NEVER had galled threads on anything I've used it on.