My old DIY Flexy style rack used to be perfect for this issue - I would touch one of the metal legs of the rack prior to touching any of the gear.
It was more of an issue in my townhouse 5 years ago, with a finished basement with carpet. My current cave is unfinished, though there are sections of carpet, and I generally don't touch the gear anyway, since it is all remote controlled via PC, other than turning the amp on or off, and in this space there are not frequent shocks.