Pigs are cleaner than chickens. People find this hard to believe, but when pigs are in a pen, they will all go to one area of the pen to evacuate. Chickens shit all over everything.I would think that pigs raised on a farm should be clean enough for both Jews and Muslims.
even if internal worms were not transmitted to humans, external parasites and viruses still can be. As for cooking....not like they had internal thermometers to test the meat. No refrigeration. Poor sanitation. Pigs eat feces and wallow in slop. It was not easy to get rid of worms back then. Garlic and wormwood were the typical cures and not always effective.