As far as I know your only option is to make an adjustable part that mimics compression by changing its shape. I have done this in the past to simulate bellows, but it wasn't easy.
Ok, sure it can be done. Adjustable part, angle as variable and the part adjusts according to angle. Cumbersome, but does work. Here's a crude video to demonstrate. This is without animation, but should animate ok.