With a qualified vet, it's not a dangerous surgery (well, any more than surgery is inherently dangerous for any living thing, including humans). We do routinely neuter boars, and haven't lost any in years, since our vet first started doing neuters.
However, as mentioned, 9 times out of 10 it's because the boars are stuck in pet store cages, which are essentially glorified litter boxes.
We are as gods to the beasts of the fields. We order the time o' their birth and the time o' their death. Between times, we ha' a duty. - Terry Pratchett.
"Men have forgotten this truth", said the fox, "But you must not forget it. You become responsible, forever, for what you have tamed. - Antoine de Saint-Exupéry