Animate connection between 2 carriages

Hello, I’m working on a tram and i’ve been wondering if i was able to make the Connection between the 2 carriages more realistic:

I’m not planning to use beams, i’d like it to stay 3d

With which technique / How should i approach that?

Thanks in advance