Not necessarily that easy. For example, they didn't think farmyard manure was unclean but nonetheless used it to grow vegetables. My intuition is that it's easier to remember pig as "filthy", "unclean", "kosher", "forbidden" than their place in a complex and ever moving ecological system. Written record left by scholars could be deductions made about the current state of things and its lost meanings (that's actually part of my intuition).
Pigs were considered unclean more for their consumption of human flesh than for their consumption of human feces. Geological conditions in the Levant meant that bodies were typically interred in crypts or caves rather that being buried 'six feet under' where the decomposition couldn't be smelled by scavengers.
Plus, the one doesn't exclude the other. The taboo could be because of the reasons the parent mentioned, and the "unclean due to eating feces" could just be a post-fact rationalisation of it.
Any health issues are seen as a cost of doing business, after all they are a million ways to get sick and die in the third world.