Watching the crew prepare the locomotives is like watching a ritual that has been performed the same way for generations.