It's an idea that's been around. When a car that's been in an accident shows up on the forum, typically someone asks if the salvage yard has it plugged in to preserve the battery.
(See for example this thread: Damaged #1207 )
The thing is, I'm not sure Tesla wants to be swapping battery packs from physically damaged cars. There's probably some way they can go about verifying a battery pack is still ok, but I'm not sure it's worth it to them. There's always some risk with a potentially damaged pack and it's likely not worth the liability.
(See for example this thread: Damaged #1207 )
The thing is, I'm not sure Tesla wants to be swapping battery packs from physically damaged cars. There's probably some way they can go about verifying a battery pack is still ok, but I'm not sure it's worth it to them. There's always some risk with a potentially damaged pack and it's likely not worth the liability.