Loperamide is "Imodium" and it simply slows peristalsis down in the bowels, that's how it helps diarrhea...so in theory, what it can do if you have a lot of inflamed tissue is cause food particles and stool to be in contact longer and spend more time touching and irritating the ulcerations and inflammation. I was told it's best, if possible, to avoid taking it when you're REALLY inflamed because then it can make food/stool linger along the walls and do more harm than good. In theory also, it can help with hydration, as the waste has more time to be leeched of water when traveling its course through the bowels (mainly the large intestine is in charge of taking water out of waste)...
I take 4 to 6 pills a day, most days, as urgency and frequency are my worst symptoms by far, and was told that is perfectly fine for me to do, as long as it's not more than 2 at a time, and is about 5 hours or so between doses. I've been feeling better as of late, and many days I just take 2 in the morning and that's all, but sometimes I'll take another 2 if I'm going out somewhere and want to limit my chances of "episodes" or issues.