When I approach the locomotive in coop my framerate instantly drops to 4-5 fps from usual 60-100 fps. The problem doesn't happen when I get near it in Singleplayer or in the Proving Grounds, only in Coop.
In this clip you can see that when I switch to a vehicle which is far from the train my framerate is fine, but when I switch back it lags again:
Here you can see how my framerate drops when I approach the train and after I reverse away from it my framerate is back to normal:
Same as the previous clip, but this time it starts lagging at greater distance, probably because the host was pulling the train:
The person who was the host in this clip added me to friends on Epic and this is what he wrote:
So it's not just me. I later asked him to start the game in singleplayer and tell me if it laggs then and he confirmed that in singleplayer it runs fine.