There is one classical piece based on the polyrhythms of a steam engine, the scherzo of Bruckner's Ninth Symphony. He was a train buff (went along with his OCD personality) and had a specific model of loco in mind, one with a triple-expansion engine. It's the most rhythmically complex music of its time.