I'd say there was a big difference between a push-pull with a loco on the rear and a multiple unit in this respect. The train that derailed at Polmont had a Class 47 on the rear (112 tonnes) and the leading vehicle was a mk2, can't immediately find a reference for its weight but probably less than 35 tonnes. So a sudden deceleration at the front would set up some significant compressive forces, creating a risk of jack-knifing.
Nor can I find per-car weights for a 317, but Wikipedia has individual axle loads for a 319 and figure for the car with transformer and motors is only 60% more than that of the heaviest non-motorised car. The discrepancy may be slightly more for a 317 as that has less equipment (eg no shoegear) on the non-motor cars, but still nowhere near as much as with the push-pull.
However all the Sprinter and subsequent classes have one engine per car, driving both axles of one bogie.
It's best to think of a loco at the back of a push-pull set as the equivalent of a number of carriages, just in a shorter length. If the leading vehicle hits an obstruction, the combined kinetic energy of all the vehicles should swat away most obstructions. What has to be watched for is something that causes the wheels to be unloaded especially on a curve or in proximity to points.
At Polmont, the train was on a right hand curve. When it hit the cow, it appears that the leading left hand wheel managed to run over part of its carcass causing it to derail. Once derailed the wheels wanted to go straight on and after nearly 100m, the left hand wheel fell down the side of the ballast shoulder causing the vehicle to overturn (heavily summarised). It wasn't the collision, but the derailment that led to the damage and casualties.
Similarly, at Great Heck, something dislodged from the road vehicle caused the leading bogie to derail into the 6-foot. This continued for some time until the train met the turnouts when it was suddenly deflected left which caused the jack-knifing. Again, not the collision, but the derailment.
Finally at Stonehaven the landslip effectively formed a ramp which derailed the HST vehicle which was much heavier than the Polmont or Great Heck driving trailers.
I'm stressing these points as in other circumstances, trains have hit obstructions and not been derailed.
This means that it's not just the mass that matters, but the nature of the collision (eg head on or oblique) and the quality of the steel bars called lifeguards which are positioned in front of leading wheels to sweep obstructions off the track.
I' gone into some detail, as the factors in collisions are many and complex.