So be it! That's life.
It's perfectly normal for bowel movements to be on a schedule. If a student it leaving your class multiple time per week then have a discussion to see what's going on, you might learn something about their life that paints them in a new light. Or, maybe discuss the possibility of going before class starts if possible.
I think people are downvoting your original comment because referring a student directly to the nurse is a strange thing to threaten upfront.
Again speaking from experience, there’s nothing more humiliating than leaving a bloody mark in your desk because your teacher limits bathroom passes. And even if you think that you would make an exception, many well-behaved students won’t speak up, hoping they can make it to the next class. If you’re ‘enlightened’ enough to let your students go to the bathroom three times a week, you’re enlightened enough to call the truants on their BS without penalizing the rest of the class.