There's an expression for heartburn if I am not mistaken and it's "upset stomach" as in "I have an upset stomach, so I can't drink beer". However, I can't think of a single idiom or phrase for people who are diarrhea prone and who need to go to the bathroom often.
I believe this is called Irritable Bowel Syndrome
Irritable bowel syndrome (IBS) is a common disorder that affects the large intestine. Signs and symptoms include cramping, abdominal pain, bloating, gas, and diarrhea or constipation, or both. IBS is a chronic condition that you'll need to manage long term