Factual error: The train consists of four locomotives, but close ups beaneath the train show the wheels of freight cars.
Factual error: When Buck and Manny fall down from the sewer exit into the water, they should be dead or seriously injured as the water is covered with large rocks and is shallow.
Factual error: The connecting cables between the locomotives are obvious movie props. The real ones don't plug into each other - they plug into sockets on the locomotives because it is dangerous to have the connections hanging down where this film shows them.
Factual error: A locomotive on a single track finds itself on a collision course with an oncoming freight train. The dispatcher manages to contact the engineer of the freight train and to throw a switch diverting the freight onto a siding. All the freight train is accommodated on the siding by the time the locomotive arrives, so the locomotive clears the freight train, but it passes over the switch without being derailed, even though the switch has been set to favor the freight train - and the siding.
Factual error: During the collision with the freight train, a long shot shows the right side of the runaway passing as debris rains down on and around it. As the third locomotive passes, a 'truck' (the 4-wheel carriage that the freight cars ride on) bounces off the top, then bounces off the cab of the fourth locomotive. And never causes any damage to either locomotive! The first hit should have mangled, even torn off some of the bodywork covering the engine of the 3rd loco, and the second hit should have torn open the cab of the 4th. It hits that cab exactly where Manny is sitting, so he would have been killed. Of course, this footage is of scale models, so they didn't sustain damage the way the real locos would have. (00:48:15)
Answer: It wouldn't derail, it would break the bolt on points - the part of switch that moves, causing the points.