Good fiber in your food, probiotics, plenty water and you all will not believe this, clean your anus with water after each bathroom use. That is part of the problem.
In our body there are two big open holes, mouth and anus. Well, there are nostrils and ears, but it is more important to clean your mouth with water after eating and anus after having a BM.
Ancient cultures had these practices and then we invented tissue paper.