A company providing environmental services has been prosecuted after a worker was killed during asbestos removal work at a Welsh High school.