Why would you replace it if doing so is uneconomic?
Panel lifetime is very high. The scope for efficiency improvement is not huge (unless there is a cost breakthrough in multi band photon capture). It's not a car, phone, or computer. It's more like the rest of the house electric infrastructure.
I had my rooftop solar over 10 years ago and basically intend to leave it until some maintenance issue forces action.
(Also, the kit secondhand value is hard to determine but far from zero; 30-50% maybe?)