The fact pigs are currently raised by the world's poorest societies, and that pigs were raised by other groups in the same area the pig taboo emerged suggests hypotheses of the animal being costly to raise are likely to be false.
That doesn't rule out competing with a different domesticated animal or just being incompatible with a lifestyle.
My point is we need to stop repeating memes that just sound good to us and actually consider the evidence.
As for the health hypothesis, if you weren't referring to trichinosis, what health issue were you referring to?
Which does raise the question. Why were pigs being raised? And for what reason? Do we have any evidence for that?
I would suggest that pigs were being raised and not running wild in towns and villages i.e. they were cultivated.
Were the cultivators likely to of a certain caste who were deemed abhorrent? Maybe they ate their stock? Wild pigs would have been slaughtered, hunted etc.. since they would destroy our new founded cultivation.
We bred them.
If we are happy with the above, we can construct social arguments as to why the eating of such animals was deemed wrong.
My own quick research shows that pig leather for example is/was deemed smoother and better than cow – luxury goods no less! Also the bristles were/are good - we still have hog hair brushes for painting.
For all we know, they could have been prized beasts, but maybe the cultivators not.
It could be that this as nothing to do with 'medical' reasons since in those days we believed unhappy gods, ghosts, phantoms and so on caused illnesses.
Quite a leap in those days to to say “Yes, all the above create illnesses (the gods/ether/spirit/flux etc.). er.... but so do shrimp or pig” , (both feeders of crap incidentally, but one at least, as I mentioned, was cultivated then, maybe the other was too, Google about shrimp farms in Vietnam and see what they feed them).
I reiterate, the question 'Why were pigs being cultivated in the first place and by whom, and for what reason?' might be a different/better starting point in finding an answer.
Personally I would love to hear from someone who knows about the history of pig rearing.
P.S. Look at the recent Halal meat débâcle recently in the UK. Both sides arguing the veracity of their flesh, both human and animal. What a waste...