Unfortunately, it doesn't always work that way. The caps tek used leak through the lead seals long before they cease being good enough to meet the ripple specs.
I think the capacitor manufacturer knew that leakage was going to be a problem, because in addition to the usual rubber lead seal, they filled the area after the seal with red, or black epoxy.
<snip>
Hello--
IIRC, at one of my former employer's facility, the solder flux-remover solvent in use at the time attacked conventional electrolytics' rubber end seals. The epoxy end seals prevented the damage but those capacitors were more expensive. Again IIRC, the PC-board manufacturing process changed to a different flux and solvent that didn't attack the rubber end seals.