A Nottinghamshire foundry has been sentenced after two employees suffered serious burns from an electrical flashover.