WD-40 is perfectly fine. In fact, you can spray it right on the contacts, and it will give you a cleaner connection.
I use it regularly on the connectors on my Torqeedo. They have small pins which are exposed to moist air (sitting on a boat).
2011 Torqeedo Travel 1003 electric outboard on a 22' sailboat
2012 Leaf SV (traded for Bolt)
2015 C-Max Energi (302A package)
2017 Bolt Premier