Can they be made to fail safely? Sure.
Can they be made to never fail? Not for what anyone's willing to pay for them.
In the case of lithium batteries. Our problem isn't the stored electric energy, it's the medium being a highly flammable alkaline metal. If we could somehow store that 0.5 MJ/kg in a non-flammable medium with similar energy density it would have 5% the specific energy of a similarly massing piece of hardwood.
Energy density is not the main danger factor.
Are there any firefighting techniques in use for handling car-size batteries?
The state of the art is to have a container, fill it with water, and put the car in. You then wait a week or two.
For installations like this one which just burned down the answer is mostly: Don't let it catch fire! And if it does catch fire, make sure that you built it with large enough gaps between each unit that the fire can't spread, because you're not putting it out.
Still, hypothetically, can you use a (large) hose to fill a burning MegaPack container with water to cool it down? Maybe possible shorts in the other pods will make things worse?
As a firefighter I can confirm this.
What worries me though is, that this might work well for cars, but what about batteries in homes, like Tesla powerwall and alike?
We do not yet have any plans for those, you can't "easily" attach them to a crane and lift them into a container. They are built in basements, garages and more. This will become challenging in the future...
Even straightforward engineering problems need funding to get engineers assigned to them.