By the limited information you give and the (not too great) photo, it seems it is a mechanical encoder, not an optical one.
You don't give any information about the equipment it is mounted on, but 15 years of continuous operation may be quite a lot for a mechanical encoder. Probably the contacts have worn out and there is no reliable way to fix them using any sort of chemical.
Best course of action is to replace it with a new one. The cheapest crappy encoder you can buy on ebay (~1$) could work better than your worn-out encoder, at least for a while.
Of course that is not a suggestion for a long-term fix. If you care about the equipment, you could probably find a suitable replacement on any major component distributor (digikey for example, or RS components), for a couple of dollars.
Just for example, I just did a quick search on digikey trying to find something vaguely similar: BOURNS PEC11L Series - 11 mm Low Profile Encoder (datasheet).
As you can see from this datasheet excerpt (emphasis mine):
the expected minimum encoder life is 100k full rotations.
Assuming (optimistically) that the average life is twofold (200k rotations) and that the shaft is rotated on average 50 times a day (not uncommon in a control console in a work environment) you get 4000 days average life, i.e. about 11 years. Therefore what I initially said about your encoder being at its end of life, is perfectly reasonable.
All this assuming it is not some specialized high-reliability encoder.
If you want better advice post more information on that encoder (model number, better photos, info about the equipment, etc.).