OK... first of all there are thousands (no joke) of coupler designs. If you've seen "Thomas the Tank Engine" you're familiar with 1830s era chain/buffers but those are obsolete. I can only talk about the modern USA Janney coupler. My comments might be totally wrong in Norway or Russia or pretty much anywhere else. Saudi Arabia of all places uses Janney couplers. (edit to add my point is there may exist a coupler design in Germany or England or something that inherently uses springs. Just not in the USA, not for over a century, ours are solid bars of interlocking hands made of steel with a guard that prevents them from unlocking and a pin/latch arrangement that prevents them from swinging open...)

Anyway if its under tension it can't be unlocked. When you release tension you can shove a pin out of the way (if its not rusty) and it then can be unlocked. So that in itself is an interesting comment. If the train isn't under tension it literally can't fall apart short of metallurgical failure (like a crack) and train crews don't like it when their train falls apart, so the don't like their train not being under tension. All freight couplers are the same but the hazmat and passenger car couplers are a little weirder and slightly harder to uncouple and have a lot less slack by design (I've been told its mostly closer mfgr tolerances). None the less couplers do rust and removing tension means a rusty coupler could unlock and train crews hate that. So yeah, crews don't like a train that gets compressed. You have to back up to switch but you don't do it for fun or whatever. Aside from the whole visibility thing which means you could kill some poor dude a half mile away backing over him and never know it.

The thing that connects the coupler to the center of the car is called the draft gear. To say it has a high spring coefficient would be an understatement. Some cars/engines don't have any draft gear at all and the coupler is welded right to the center / spine of the car. When a train couples, the spring flexes so things aren't permanently bent. Its not like a shock absorber in a car which flexes all the time while rolling along, its more for damage reduction (edited to add, and the coupling process itself)

The slack comes from the 1/2 inch or so space in the coupler, times a large number of cars. A hundred coal cars times 1/2 inch is like 5 feet of slack ... So no need for springs you've got all the slack you can handle in the couplers. You could spec a coupler with 1/16th inch precision but then every time you switch a freight car you'd need a guy with a sledgehammer to screw around for 10 minutes so thats hazmat and passenger only which I have no experience with.

Since the (19)60s all cars have roller bearings and the static friction is so low that unless you applied the brakes in some weird manner the cars will kinda flop around on their own. Pushing a train is an interesting experience that should be a part of all physics experimental curricula. You really can push a train by hand. It won't be easy and it won't go fast and it definitely won't accelerate very fast, but its not hard. So you could only guarantee compression if you're actively moving / just moved or you're headed downhill slightly. Wind can actually move cars around. This is why all cars need a parking brake (that horizontal wheel) in addition to the air brakes. It would be mechanically complicated to put a train under compression but it could be done by locking the brakes or something.

The static friction of a car is like 100 pounds if the bearings are in good condition and the parking brake is completely removed etc etc. The slightest incline, or maybe even wind load, exceeds the force of static friction. If you have a hundred tons of coal in a car, the static friction is a mere rounding error. It might be calculable, or even measurable, but it won't be noticable when driving.

(edited to add the best car analogy I can give is its like a skateboarding kid hanging onto the back of your car, you're just not going to notice the extra friction compared to the mass of the car)