There are commercially available electronics parts cleaning solutions that sometimes work. It's generally better to just replace worn components though. There is a list of parts suppliers on this FAQs page that carry everything necessary to breathe new life into an older guitar.