A tricky one, Hyperion gives the reasons for cap replacement but in order to determine whether or not those conditions have been met you do need some fairly serious and expensive test equipment.
Low capacity and an indication on ESR cap be picked up on those GM328 based component testers but leakage, dissipation factor and accurate ESR measurements needs a LCR bridge.
You can of course play with your 'scope to get an idea of ESR too:
https://meettechniek.info/passive/capacitance.html
I have restored quite a few vintage amps and receivers from the 60s and 70s where the small caps were dried up and measuring badly or all over the place. In only three cases, a Yamaha, a H&H and a Scott that had terrible case ventilation, did the main filter caps measure below tolerance capacitance and out of tolerance high ESR. They were replaced with much better measuring replacements and the sonic improvement was noticeable. Without wishing to sound like a audiophile trying to justify a £2K mains cable, the sound "opened up" with a "blacker background" and more "slam" to things like orchestral crescendos.
Armed with these measurements I then pulled and tested the main caps on most of the rest of the amplifiers, ones that were otherwise fully recapped/restored, and found that the fresh, modern replacements indeed measured better than the old ones.
I think this is to do with the end of life definitions for these caps, they dry out just like the smaller ones but as there is much more to them they dry out slower and so whilst probably still measuring in the official spec are not quite what they used to be when new.
I replaced these caps as I had them out for measurement and found the difference in sound to be... well less obvious than with replacing truly knackered capacitors as above.
Sometimes I think I can hear a difference, sometimes not in other words.
Amps from the 80s and 90s, unless class A or otherwise hot running, don't really need recapping in my experience unless there is some know issue.
The position I've arrived at is that capacitors are consumables, if I'm going to restore an amplifier I am going to replace all consumables and leave the amplifiers that don't need restoring alone.