It isn't unreasonable to just disassemble the entire car and sell all the parts on the 2nd hand parts market and earn enough to buy a new similar car.
I heard some irrational sounding numbers a few years back. Maybe prices have come down, now that more Teslas have had the opportunity to be totalled and sold for parts.
If you have a project car that really wants a tesla engine.. the car wants what the car wants. I wouldn't be surprised if some number of Teslas have been bought new to scrap.
It's always been legal to sell parts off your car. Do not buy anything that attempts to prevent you from owning what you bought through any sort of user agreement.
The car I did this to was totaled in Belgium, bought for the scrap value and repaired on a very small budget. It is still driving the streets of Bucharest today. The MOT inspectors could not find proof that the car had been worked on, which I took as a badge of honor until they went off on a tangent that therefore it must be a stolen re-id'd car. Then I showed them the step-by-step pictures and it was all good. Fun job!