I would have expected the rail to tear loose from the ties (or roll over) with so much side force, rather than toppling the engine. Maybe that caused the engine to go over? Or soft ground gave way? That's obviously new roadbed replacing what might be soft ground that didn't support the derailed train.
Also, that looks like a chain of engines with exhaust visible from the far end of the chain. Looks like the driver way down there didn't get the message everyone was shouting. Pare!!! (Stop)
What a mess.