Man gets trapped in machine and dies at South Carolina plant