Appalling!
DH who has UC amongst other things has carried a card for decades which says something along the lines of" this person suffers from an illness /condition which means they may need immediate toilet facilities. It is not infectious in anyway, please allow them access to your facilities"
Try your IBD nurse or consultant if you have anything similar.
Re using cafes, I am a past master at breezing into Costa/McDonalds wherever pretending I am meeting somebody or heading upstairs etc then breezing out again!
But more seriously, in Germany where there is a small charge for loo use in cafes, restaurants and shops, but a) the loos are immaculate, supervised by an attendant, flowers, loo seat wiped etc but more important, b) anybody can walk in and use them without having to top up their bladder with another cup of coffee.