In the case of Spain, if a foundation bankrupts their assets can only be transferred to another non profit organization. It's against the Spanish law for a company to buy a assets of a foundation
I really doubt that’s true. It would mean that a foundation that owns any goods (buildings, rolling stock, etc.) would not be able to sell them, ever, except to other non-profits.
Are there any non-profit car wrecking companies in Spain?