Having recently repaired my HP 6227B (see thread here) I'm curious of "best practices" for repair/restoration of older equipment.
For example I've often read here of people replacing the electrolytic caps. It seems that's a "good practice" to follow, especially as the caps might otherwise appear perfectly fine (which was the case in my HP 6227B).
If one is replacing electrolytic caps, what about mylar or ceramic? Do they suffer the same performance degradation over time? Or just electrolytics because of the particular dielectric they use?
Electrolytic caps may need replacement, but not necessarily so. It depends on how they were made, how they were used, and their operating environment. High ripple currents, hot nearby components, poor ventilation, bad seals, etc. lead to the caps drying out. However, some of them can be just fine after 50 years.
Unless the electrolytic caps were produced during the era of the capacitor plague (1990's to early 2000's), I wouldn't shotgun replace them. First, visually check for signs of leakage, bulging or other deformation. For filter caps, check for excessive ripple while it's running. Of course, for final diagnosis of a suspect one, check out of circuit for capacitance, ESR, leakage, etc.
Tantalum capacitors can be problematic because they usually fail short circuit, explode, release magic smoke, or all of the above.
Old Rifa capacitors used across the mains inputs are notorious for burning up. If their plastic casing shows any signs of cracking, replace them with properly rated X or Y capacitors, depending on where they're being used.
Old Schaffner power line filters that are often used on the mains input of old equipment are also notorious for becoming incendiary (they have Rifa caps in them). Change those things, too.
On really old stuff (e.g., tube gear), wax and paper capacitors should be changed straight away. They're a disaster waiting to happen.
Other types of capacitors are generally OK and don't need to be replaced from a preventive point of view.
Some capacitors in the vintage equipment are quite massive compared to current parts of similar capacitance and voltage rating. Are the original (often customer) parts somehow "special", or it's okay to replace with current generic equivalents?
If they're electrolytic, it's fine to replace them with modern equivalents. Be sure to meet or exceed their voltage rating. The capacitance can be slightly higher if an equivalent isn't available. Going too high (e.g., 2x or more) might cause higher inrush current that could be problematic, depending on what they're used for in the circuit.
Some old caps look like electrolytics, but may instead be wet tantalum or something else. If in doubt, find out.