Generally, contact cleaners contain 100% solvent, which dissolves grease, carbon deposits, and other contamination, and allows it to run off. The solvent then evaporates, leaving a clean, conductive surface behind. Aerosol lubricants, like WD-40, have some cleaning ability, since the oil in the can has to be dissolved in a solvent. In this case, the solvent dissolves the contamination and a light oil is left behind. This oil can provide lubrication, allowing a connector to be inserted easily. It can also provide some hydrophobicity, preventing moisture from collecting in the connector and either causing a short circuit or corrosion. Chemtronics offers DPL (Deep Penetrating Lubricant) and CircuitWorks Gold Guard Pen for this type of application. One problem with adding oil to a connector is it can collect dust and other contamination from the air around it.
WD-40 Specialist Contact Cleaner Spray with Smart Straw, Twin Pack , 11 oz, [12-Pack]
WD-40 Expands Specialty Line
WD-40 360ML Specialist Fast Drying Contact Cleaner + 333ML Multi-Purpose Lubricant WD-40 Series
WD-40 Unveils Redesigned Specialist Line
Can I use WD-40 on a computer's motherboard? - Quora
Electrical Contact Cleaner Lubricant
WD-40 Best Practices - This Old House
WD40 Lubricant Spray with PTFE Leader in lubricants and additives
WD-40 3 oz. Original WD-40 Formula, Multi-Purpose Lubricant Spray, Handy Can 49000 - The Home Depot
Fast Drying Contact Cleaner - WD-40 Australia