That the lead loco didn’t tip over seems to indicate that it wasn’t the speed that made it go AWOL.
Though I suppose that the trees could have helped to keep it upright. The loco seems to have had it’s roof heavily rearranged.
So, yeah, I don’t know.
If the engine is pulling, then if it goes off the track, I would think that the momentum would pull the other attached cars with it.
Unless it came to an abrupt stop.