I also think that anyone who claims that pigs could easily be taught and trained to do everything that companion and working dogs can do is not actually familiar with either working dogs or pigs.
(And that pigs have to WANT to do this).
Very different species with very different motivations!
If things get really out of hand and all else fails, I can out-muscle most leashed dogs. With a pig, I am but a passenger. This seems like a problem in public spaces.
Fun data point: while it's well known that pigs are traditionally used for truffling, and are in fact better scenting truffles, modern practice typically uses dogs, who unlike pigs can actually be trained not to eat the truffles or destroy mycelia
You can train pigs to do a lot of things, but it is a pain in the ass, takes longer than a dog, and yeah totally dependant on the pig's personality, which is generally not cooperative
One of those weird little facts that I picked up somewhere like Trivial Pursuit or something is that the hardest part of teaching a pig to hunt truffles is teaching the pig not to eat the truffles before the human can bag them.
Friend got a teacup pig as a gift. Pretty soon, her house and garden were being rebuilt to accommodate a MASSIVE livestock animal. But if that's what you want, go nuts.