The camera would probably only need to look at a very small section at high speed. They could be specifically made to film the tracks or the wheels of the train. Such cameras exist. Not cheap, but even some YouTubers have similar ones, to film high speed impact videos of things going much faster than trains. Might be worth it for trains.