Don't you have to replace the batteries every few years though? That should be factored in the equation.
solar systems don’t require that much ongoing maintenance. There just aren’t many consumable components. (And battery recycling is getting better by the year)
My solar system uses a Tesla powerwall. I'd expect its real world performance over time to be about the same as what you see in batteries for Tesla vehicles.