Honestly I used to have horrible problems with this when I was a kid. But the moment I started drinking coffee (especially instant) I never had the problem again. My suggestion would be to consider coffee - also probiotics.
I use Miralax on my cat when he gets in trouble. But I try not to use a lot of it. With him I also use oil. Salmon oil. It either makes it slide right out or doesn't agree with him. I sometimes use coconut oil for that purpose.