Oh OP, I'm so sorry that you didn't get more help or support from the pediatrician today, though as a fellow American I'm not surprised— these days it feels like primary care doctors rush to refer out anything that is seen as even slightly new or complex. I can feel your frustration and disappointment through your posts, so I wanted to give you some ideas on things you can do and think about over the weekend.
I'm a behavioral therapist for children with disabilities who often have complex medical needs and toileting issues naturally go hand in hand with that. I often consult with schools through my work to create behavior plans and ensure that children's medical directives as being adhered to by teachers and key workers as part of their IEPs (individualized education plans, for the non-Americans). I admit that I gasped out loud when you said your son was not being allowed free access to the bathroom at school and that he has come to be fearful of school bathrooms as a result. You are absolutely right to say that no five or six year old should be denied the ability to go to the bathroom when requested, but that's doubly the case when a child is dealing with GI issues and/or having frequent accidents. It's hard to know if anxiety over using the bathroom and holding in poo is what caused your son's soiling problem, but it is has certainly worsened the problem, at a minimum. Once you've seen the specialist and gotten a diagnosis and care plan, I'd ask them to write up their recommendations for your son's bathroom needs at school and request a meeting with your son's teacher and principal to go over it and talk about how it will be implemented. His medical needs must be accommodated to the letter.
If I'm understanding your update correctly, you also suspect your son could have cyclic vomiting syndrome? How often is he vomiting? That is very concerning, particularly when paired with the soiling and frequent diarrhea and definitely needs to be mentioned to the pediatric gastroenterologist when you see him. It could be a sign that your son's chronic constipation has become severe or could signal a different GI disorder is causing his issues, such as IBS, Crohn's disease, or celiac disease. It is critical that your son gets seen as soon as possible. I would call the office you've been referred to as soon as they open on Monday and explain that your son is having explosive diarrhea multiple times a day which has worsened significantly over the past month to the extent that you can no longer send him to school because they aren't equipped to manage it. I would also mention the periods of intense vomiting and the fact that he's had what at first appeared to be stomach bugs three times in the past month, but without a fever or exposure to other sick children. Tell them in your opinion, he MUST be seen this week and you are willing to come any time or wait in the waiting room for multiple hours if that is what it takes to get him seen. If they can't get you in within that time frame, ask them to recommend another pediatric gastro in the area that has an opening sooner. Don't be fobbed off. Be polite but firm and make sure they understand just how worried you are about your son.
Back to keeping your son at home for the time being, I think you are making the right call, though I understand how stressful it is to have to clean up multiple accidents per day. I would go ahead and start your son on a children's probiotic (they make gummy ones for picky eaters) or have him eat a yogurt that is high in beneficial bacteria like Activia if he will willingly eat it, as it can help with a range of stomach ailments and has no known contraindications. I would also get him in the habit of sitting on the toilet every 2-3 hours for at least 5 minutes, regardless if he feels like he has to go, since he's become scared to use the bathroom and isn't noticing his body's signals that he needs to poop currently. Set a timer and let him do something he enjoys during that time like listen to music or watch his favorite cartoon on an iPad if that's what it takes to get him to relax (relaxed, distracted child = relaxed sphincter muscles which can help him poop). Push fluids as much as you can too since constipation is worsened by dehydration and diarrhea can cause dehydration.
I'd also ask your husband to swing by a drugstore and purchase a stash of Pull-ups or similar. In my experience, the Tena brand super overnight heavy absorbency underwear work really well. I use them with a client with cerebral palsy who still has random soiling issues once or twice a week. He wears them daily and his bowel movements are almost always contained in his Tena briefs without getting on his clothes or anything else. You can usually find them at CVS, Walgreens, Rite Aid, or similar.
Finally, I'd try to keep a food and bowel movements journal over the weekend. Make a note of what your son eats and drink, the amount of intake, and when he consumes it. Record every time he goes to the toilet and if he produces anything or not. Have a look at the Bristol stool scale and use that to categorize his output. Do the same for any accidents he has. Bring your notes to your specialist appointment as they will find the data very useful.
Hang in there, OP. Hope this helps!