A North Yorkshire company has been fined £250,000 over the death of an employee who got trapped in machinery.