Failed Solar Panes and their Removal Deductible?

I'll bet no one has had this type of question yet!   It's a new type of tax challenge, maybe!

I had 32 solar panels made by BP, which were installed in 2006. 
3 years ago or so they started failing.  The were collapsing, junction boxes shorting out, and my roof began leaking. 
I had them reconfigured to remove the failing panels ($1560) in 2018.  Then, it started looking like I had to remove the rest because they became a fire hazard, and the racks were rusting through the roof attachments, which also meant a new roof in 2019.  (About $20K)

In the meanwhile, I discovered their manufacturer, BP, had a class action suit against them for these very reasons.  BP is long out of the solar business and can't replace nor repair them.  I applied for the suit, but was ultimately rejected in 2020 simply because my serial numbers were a year off from the manufacture dates of the suit. 

So.. This $56K investment in 2006 just cost me another $20K in 2019. 

I've definitely taken the residential energy credit over the years.  2019 will be the last year I have anything left.  $483, I think. 
Is this, or how could any of these costs be deductible? 

Thank everyone for their time.