Bingo.
Took the turn too fast.
Engine separated from the rest of the train, left tracks, and made it over to the nearby tracks.
The following two cars struck an embankment at a high rate of speed — hence the mangling.
I’m betting that the first wheel hit a pressure switch, causing the explosion under the front of the lead car. Perhaps the upward explosion lifted the nose of the first car and it went off the rails, separating (by design) from the rest of the train... which plowed forward into the now-mangled rail.