A parcel delivery firm was fined £850,000 this week after a worker was crushed to death at a depot.
David Kennedy, 43, had just started training on new equipment for moving trailers when he was involved in a horror accident.
He was rushed to hospital with serious chest injuries but died two days later.
Hermes Parcelnet Limited admitted that breaches of health and safety legislation led to Mr Kennedy's death at Eurocentral, Lanarkshire, in March 2019.
A sheriff said the tragedy could have been avoided had “significant failings” in training been addressed.
Imran Bashir, prosecuting, told Hamilton Sheriff Court that Mr Kennedy had been with the company for around 20 years and was described as a "competent and hard-working" employee.
The company had introduced trailer movers and workers were being shown how to attach these and move trailers in and out of loading bays.
Mr Bashir said the night shift worker had started his training only 30 minutes before the accident.
At that point he should have still been at the "classroom assessment" stage.
Mr Bashir told the court: "Training on the trailer itself should not have taken place until the second hour.
"There was no appropriate supervision. The other two men with Mr Kennedy should have been acting as 'banksmen' and telling him if he was too close to a stationary trailer.
"CCTV shows the trainer was at times in a position where he was unable to see and correct any mistakes that were being made."
It appeared Mr Kennedy had inadvertently pressed a button that caused the mover and attached trailer to come towards him, pinning him against another trailer.
Mr Bashir added: "Some operatives did not feel comfortable using the mover and felt training should have lasted longer."
Hermes, which has since re-branded to Evri, has no previous convictions for health and safety offences.
Its lawyer said it takes such matters "extremely seriously" and expressed its "deepest sympathy" to Mr Kennedy's family.
Hermes had been assured by depot managers throughout the UK that implementation of the new trailer mover system had been going well.
The lawyer added: "In hindsight, the company accepts that this assurance should not have been accepted without some form of independent confirmation taking place."
Sheriff Colin Dunipace said: "I appreciate the huge sense of loss that must be felt by family and friends. My deepest sympathy goes to all affected by this tragedy.
“They have suffered unimaginable consequences."
The sheriff added: “There were a number of significant failings on the part of the company. If these matters had been addressed properly the tragic consequences of this incident could have been avoided.
“This was a serious breach of its statutory duty.”
The company, which made a profit of £106 million last year, was given 28 days to pay the fine which was cut from £1.25 million because of its guilty plea.
Don't miss the latest headlines from around Lanarkshire. Sign up to our newsletters here.
And did you know Lanarkshire Live is on Facebook? Head on over and give us a like and share!