If you demolish an entire building from an abandoned base, you only get the materials from the building. But you can't get the materials from the facilities in it, though that one is also disappearing. That should be adjusted.
The same applies to your own buildings.
In addition, if you demolish the building or structure, the contents of the warehouse will be lost, it shouldn't be. With something like that, a box with the material should be left over so that it can still be secured.