Two maintenance workers employed by Essential Supply Products were replacing the bottom of a heavy sectional door inside the company's Malvern factory on 5 May 2015, Hereford Magistrates' Court heard.
They removed the hinges and brackets and this caused the door to collapse on one of the men, pinning him to a nearby baler.
He lost consciousness for eight hours as a result of oxygen deprivation and also sustained broken ribs. He has made a full recovery since the accident.
The Health and Safety Executive found that the company's managers did not recognise the risks posed by replacing the door section. The workers were not given appropriate equipment, instruction or training to ensure a safe system of work.
Essential Supply Products pleaded guilty to breaching Section 2(1) of the Health and Safety at Work Act. It was fined £20,000 and must also pay £2,714 in costs.