5 MJ kinetic energy as deformation work over about 1m (roughly the size of the dent) is 5 MN of force. If it hit a corner with cross section a 1 cm2 (a pretty blunt corner, 0.0001 m2) then the pressure comes out to 50000 MPa of pressure or 7200 Ksi.The steel used on Seawolf class submarines is HY100, it can withstand 100 KSI. It is made to survive far more than 1 kg of tnt, think 500KG (mk48 torpedo)
Rough estimates. But it shows that it is possible to at least dent. Once dented the pressure at depth is no longer evenly distributed and a hollow structure - like a sonar dome or ballast tank - gets crushed.