I doubt very much there's a lot you can do about it - but there is a misconception here.
When the equipment is sitting on the shelf, it's not building up a static charge of its own. (Of course, if it has faulty power supply insulation then it could give you a buzz from the mains, but that's a separate issue - you'd need to find the faulty piece of kit and get it fixed).
You, however, are building up a charge, every time you move two insulating materials against each other. Walking about wearing clothes works well! When you then touch your equipment, the charge is transferred from you to your hi-fi.
I've been getting a lot more static shocks since I bought my Denon DVD-2900, the only piece of equipment in my rack that actually has an earth connection. It means there's now a path from any of the metal parts of my kit, through the interconnects, through the Denon and to earth.
If your equipment has NO earth, then you probably won't get static shocks when you touch it, because there's no direct path to earth through it.
The static discharge is harmless to you and your equipment. Every piece of kit has to be tested for ESD immunity under the EMC Directive, and the CE mark on the back means it's passed that and other tests. You might hear a brief click on audio, that's all.
My advice? Make sure your listening room isn't full of gas or petrol vapour, and live with it