I tried to think of the physics involved, but I decided reviewing a video would be easier.
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.