It’s actually PX24 which we used to use in the military.
Always thought that and WD was the same thing
The letters in WD40 actually stand for Water Displacement.
It was originally developed by a Rocket Research Contractor to the US Defence and later for NASA, it was originally used as an preventative anti rust solution for the Atlas Rockets and also used on the outside skins for the Apollo Mission as an Water/Ice Desplacement just before lift off so any Fuel Ice Build Up would disperse within seconds after Take Off.
As TB points out its an Oil based product, purely as a it sticks rather than a lubricant, and any oil is an insulater to electrical contacts as oil acts as a insulater.
Some Airport Services in the Colder Regions also mix WD40 with the Antifreeze Solutions they use when Jet Washing Aircraft prior to take off to give some extra protection on their climb out.