What is the main reason why solar inverters fail?
Electrolytic capacitors (e-caps) fail as per their MTBF (mean time between failures). By fail I mean they go open circuit or short circuit. Typical value is 2 million hours (a ball park figure).
However, after a few years of use, e-caps will degrade depending on their operational service values of voltage, temperature and ripple current. That doesn't mean they fail because, MTBF and long term degradation are unrelated. But they will degrade over the years to have maybe 30 to 50% less capacitance. Leakage current may also be higher after several years. ESR (effective series resistance) may also be higher after several years.
If the designer of the inverter didn't consider the slow degradation of e-caps and, the inverter prematurely fails to operate correctly, it makes sense to replace the e-caps if it is commercially feasible.