I've had more than one doctor tell me the best treatment for diarrhea is to stay off solid food.
My first bad incident of diarrhea was about a day or 2 after a port call in the Philippines when I was just getting back to the daily routine at sea. I was praying to the porcelain god every 20 minutes until I had to go see the corpsman. It was my first port call outside the U.S. which the corpsman said diarrhea was a common problem advising me to stay off solid food. Drink lots of water, 7-up, gatoraid etc. and maybe a little jello. I told the corpsman it seemed odd to me since I was passing nothing liquid and he was telling me to drink lots of fluids. The corpsman told me that's just the standard treatment without offering a scientific explanation. I stayed with the plan best I could and eventually the diarrhea passed.
One day at work years later I couldn't stay off the pot for more than 15 minutes getting to the point where my anus was on fire. I went strait to the doctor after work and explained my symptoms. The doctor asked me if I had like a gurgling feeling in my stomach which I answered "yes exactly" The diagnosis was confident I had e-coli. The doctor went on to say we can't just put a plug in it advising me to stay off solid food, drink lots of clear liquids like water, 7-up, gatoraid etc. if I was hungry I could eat a minimum amount of soda crackers or plain white toast, no butter or jelly.
It all makes sense now that I remember over-eating that day, and the worst episodes on the toilet came shortly after eating. I can't say an enema will cure diarrhea by flushing out bacteria that's making you ill since I'm not a doctor, but I think your body combats offensive intestinal bacteria by producing a hormone that liquefies any solids in your digestive system thus causing diarrhea which triggers muscle spasms to rid your body of the offender.