Our pigs used to love to scratch - we had posts in the field for them and then they would find any handy sharp edge to have a good rasp
However when they started scratching with hind legs while feeding I had a really good look for any beasties.
On a couple of occasions I found mites up between their ears - and the eggs looked like tiny rice grains on the hair, that was the real giveaway. I had a chat with the vet and he said give them a rub with oil (vegetable/whatever) in the areas where the eggs etc are and this will get rid of the mites - the oil blocks their spiracles so they can't breathe. If you do it over a few days it can break the cycle. The vet did have some anti-mite stuff but it only came in commercial sized batches (enough for 200 pigs!) so he said use the oil!
After I did the regime the pigs went back to their 'normal' enthusiastic scratching, without the hindleg scratching attempts.
Tish