In my experience this has happened using WD-40:
WD-40 has a very strong penetration-power (that is why it is able to clean stuff, as it is loosens layers of crap that comes off). Obviously, it has lubrication as well.
1. POTS: I have used to clean pots and it would clean and lubricate and make it work, but after sometime, you will realize that it would slowly erode the carbon layer and eventually, your pot will need to be replaced. So do not use WD-40 for POTS.
2. Amplifier and Body cleaning: WD-40 destroys paint. I destroyed my vintage Denon (10 years back when I did not know how to fix things correctly), The front panel lost all the markings, the paint of the body started peeling off, even thought I had left it just for 5 minutes thinking it will remove all the dirt and grime.
3. Other parts in the amplifier: WD-40 reacts with certain plastics, rubber and other materials. Markings on the PCBs (that shows what a pin/connection is for , like +5 volts or GND) will get lost. Rubber linings to hold things together will get destroyed. There are sponge-like spacers between PCBs to reduce mechanical friction, may get destroyed.
So, the only thing I found it useful for amplifiers especially, is to remove rust on the inner, unpainted areas. I also use a suitable sand paper to remove rust, prime it, and then paint it to preserve the metal body.
To clean pots so far I have found only Contact Cleaner of reputable brands that mentions that it does not react with plastics/rubber. In any case, test it one place or a spare pot you might have... and then use it on your equipment.