A community has been left stunned after a man died in a workplace accident at a factory in Co Tyrone.