I grew up on a farm..."working" pigs, cattle, sheep, whatever, is about the same. There is no way you're going to be able to anesthetize every animal before minor things like removing tails, removing testicles, branding, putting in ear tags, giving shots, etc. You just run them through or snatch them up and get it done FAST. They will yell for a couple seconds, run away when you let them go, and be fine a few minutes later.
Purebred puppies have their dewclaws removed the same way. If you catch them on the right day, a good pair of toenail clippers will snip them off at the base, and they only bleed a couple drops. Dogs with docked tails are done about the same way, but at a different age. One yell, and they're fine.
Every adult male that has been circumcised went through the same thing, the doctor went snip and that was it.
I'm not saying it doesn't hurt them, but it certainly doesn't seem to bother them for very long. There is just no way to compare it to the horror of being ripped apart. Even killing the little piglets that way, it's over instantly for the pig. Now, if they put the pigs in a shredder, hind end first, it would compare...