Roof leaks that are accidental are covered by insurance, and the work to remove or replace the panels is part of that. Typically you adjust your home insurance coverage by the value of the panels when you install them to make sure everything's covered.
That just leaves the chance that the installer work will be good enough to make it ten years but not twenty, and the insurance won't cover the damage. I don't know the odds of that. It seems like it would be infrequent, but what numbers do you use?
To be clear I think solar panels can be a great idea, but it’s misleading to present only a single upfront cost when determining the years to break even
There are so many ways a rooftop solar installation investment can turn against you. If regulations change, your net metering goes away. If electricity prices drop, your ROI goes negative.
Rooftop solar is a fun enthusiast project, but it's a lousy use of solar panels. Community solar or utility solar projects are far better for homeowners. And for the environment.
The only reason people do it is that there are artificial incentives; it's not actually efficient in reality.
Your replacement inverter should only cost $1-3k in present money, depending on its size. You probably have a warranty on it for the first half of your panels’ life.
You also don’t need to pay for an expensive extensive cleaning unless something goes really wrong or you live under an HOA that is hostile to solar.
By far, the biggest factor in ROI is your generation relative to your initial installation cost minus tax credits and SRECs.