This ruined my life for almost 15 years and nearly cost me my marriage.
My husband was very patient to begin with but after countless times about to leave the house and I would turn back at the door, cancelling visits to friends, cinemas etc he became fed up with the constant disruption.
We'd sometimes be a few minutes away from the house in the car when I'd say - go back at once, I must go to the loo! And we'd go turn round and go back - and I'd be fine, no need to go to the loo after all.
If we cancelled something, the minute I knew it was cancelled, I was fine.
So we began (well I did, he'd thought it for some time) to think it was anxiety related. I began a few routines to manage things, and it's a million times better.
If we are going on holiday, I take Immodium before we set off (and after a loo visit) so that I know that I will be fine on the drive to the airport, on the plane, and when we land, can get our transfer to the accommodation without almost hyper-ventillating with anxiety.
I have had to get off trains, buses because I thought I would soil myself. As soon as I got off, I was fine.
I still prefer to sit on the aisle seat in cinemas and theatres, but have managed a middle of the aisle seat. So long as I can see the signs for the exits and toilets.
I know EXACTLY what you are going through. You can fix it though.