Once impaction sets in, it is usually with the pig for the rest of his life. Diet won't particularly make any difference. As you know, piggies produce two kinds of droppings, the normal pellets that you see all over the cage and smaller softer ones that the piggy takes directly from his bum and eats. Impaction sets in when the muscles in the rectum and anal sac become weak and loose and so the pig cannot expel the soft pellets that it would normally eat. These soft pellets then congeal into a solid mass, blocking the anal sac and not allowing the normal pellets to be expelled. You will often find that when cleaning out an impacted boar that normal pellets will fall out after the soft pellet mass has been removed. Boars suffering with impaction have to have their diets monitored and possibly supplemented as they won't be getting the nutrition that they would get from eating the soft pellets.
And yes, it does stink to high heaven when you clean them out ;D. I've only had a couple of boars with the problem and I would clean them out outside.
Kat