How can I animate several objects on the same path, in a curved path?

Good evening community, I have a question for days, I am trying to make the animation of a passenger train, which has a sequence of wagons, when the train moves in a straight line everything works fine but the complex part is in the track sections With curves, I would like to know if several objects can be placed on the same path so that each wagon rotates independently and looks real or what would be the strategy.