WD40 is a moisture disperser/freeing agent for rusted/seized parts. I would never use it on anything electronic as there are far more suitable products available which will do a better job.
WD40 has been known to attack and damage printed circuit boards and certain plastics when they have come into contact with it.
I'll just use it on mechanical assemblies.
Andy