Joint chain follow a path?

I have this train, separate cars, and each one is parented to a bone, of a chain.
Would like to make this train follow a curve/path… tried a couple of ways but no success.

Maybe check this solution:

I just found a video that is similar to that, but it’s gonna take me forever to make that for each bone, this train is 30 cars, 30 bones…