My idea is a relative small construction attached to a ship to prevent it from sinking. Lets call it a shiplifebag. SLB. The SLB consists of a flexible hose wrapped around a wheel. In the middle of the wheel sits a big compressed airbag. The airbag is connected to the hose and a compressor. Once the ship starts to sink, initiated by water pressure, the hose floats to the surface (it has a floater at the top of the hose). Once it reaches the surface an electrical pump, part of the SLB, will compress air from the surface through the hose to the airbag. The sooner this takes place the less power is needed for this. The airbag will keep the ship afloat, or at least will prevent it from sinking to the bottom so recovery is possible.
This is just a rough concept of what I think could be must-have for every ship for reasons of safety and insurance.