Hi welcome to HCM
 I have gone thru  your query regarding  recurring bouts of uncontrolled 
diarrhea . I can understand your concern .
 Dear it can be caused by many factors and  can be cured by removing the cause or causes . faulty food habits and life style plays a big role in this 
 Diarrhea infections are spread through the consumption of contaminated food and water . Many different types of bacteria viruses and parasites can cause 
gastroenteritis and subsequently diarrhea. Some common ones include: Bacteria. parasites and viruses .
  Bouts of diarrndhea usually clear up after a few days, however, during this time it’s important not to become dehydrated.
Drink plenty of fluids. You may want to consider taking an oral rehydration solution (ORS). These usually come in sachets and are dissolved in water to replace the minerals and salts that you have lost.
 Heap full of spoon of  Isbgol , a herb  with  Lemon juice in a cup of water   
Try to eat as normal, but keep meals short and light.  Daliya ,,khichdi  with fresh curd , banana  help set  your stomach right .
Frequently drink small sips of water .
 According to Ayurvedic theory of treatment ,derailment of  our Nabhi - Suryakender  - our belly button  is cause of  your trouble. Doing Asans as below will set  it right and solve the problem .
To strengthen  immunity, include  regular walk , physical activity - doing pranayam ,deep breathing exercises ,Kapalbhatti Pranayam , Bhujang asan
 Danurasan and 
meditation  under trained guide .
Avoid rich, spicy, salty or sugary foods , milk and milk  products , Over exertion , 
anxiety , alcohol , 
dehydration  . 
 if you have any more severe symptoms or your diarrhea lasts longer than a week, speak to your medical  professional.
Hope this helps solve your query . Take care .All the best .