In any case, it's not ethical to pull the engine out before you hand the car to the insurance company, but they usually won't even check or even see the car. All they want to know is that it's off the road and junked so that it's not drivable anymore.
The morally correct thing to do would be to buy back the car for the salvage price (usually just a few hundred dollars, sometimes even less), then strip out what you want. Once I even just straight up asked the insurance guy if I could pull a few things out of the car before it was taken away, and was given the OK to take out what I wanted to keep.