If you slaughter the pigs at a younger age than is typically done by most people in the USA, you don't absolutely have to do it. I've heard that around 180 lbs. is the weight for slaughter in that case, before the meat starts tasting bad. If you are doing your own slaughtering, this will work (somebody please verify or modify that 180 lb. weight). Butchers / slaughterhouses may not be willing to process a boar in some cases, so if someone else is doing it for you, check with them.
Having said that, I would agree that the younger the better within reason though probably not before 3 days old-- give them a chance to get their feet under them! I had to do two that were around 50 lbs, and that was very unpleasant and I would recommend wearing earplugs if anybody ever has to do any that big. They scream like jet engines.
Is it cruel? Maybe. The younger you do it the less cruel it is and the quicker they recover (almost instantly when they are very young).
Maybe the best way to avoid the problem is-- only buy females to raise!
And if you want to use anesthesia, I think it has to be administered by a vet, correct me if I'm wrong, which is one of the bigger reasons most people don't use it. See, pigs are production animals, unlike dogs and cats, which are pets. People will pay hundreds and thousands of dollars in vet bills for their cats and dogs, but production animals are supposed to, err, turn a profit, which means anything you have to pay for that you don't really need is cutting into your profits.
Of course some people have pet pigs, and that means they would never dream of eating them or letting anyone else eat them, and in cases like that, they may also be willing to spend lots of money for vets to do things like administer anesthesia. Then the process is essentially similar to it being done for a dog or a cat.
I hope this helps, I'm not trying to be cruel, just trying to answer your question in a helpful way.