As for leaving a class of pupils, or even one pupil, or environment in some circumstances, because things aren't going well or overwhelm, not a hope in hell.
The whole point of reasonable adjustments is to make it possible for people with diagnosed disabilities to be able to competently do a job, not a get out of jail card for choosing a job they can't do or only can on a good day.
Once those adjustments have been made, if the person's disability makes it impossible to do the job safely etc, they will rightly be pushed out under capability procedures. (I'm physically disabled btw)
My Dc has literally battled ASD impacts their whole life and still does daily, including the commute in and out.
Covid caused an unexpected career change into (state) schools and working often directly with children. It is obviously not the best environment for someone with their difficulties. However they also have unique strengths, talents, and understandings to bring to their role too, but it comes at at a cost.
It's a very stressful high paced environment, takes it's toll on all and isn't for the feint hearted. Children and young people, some with ASD as well as all sorts of difficulties and disabilities are depending on the adults around them, and occasionally in critical moments when what an adult sees, interprets and does next, is the difference between disaster or just another school drama.
In my Dc's case they are also quietly open as having ASD and are an adult role model. There is no hiding in the toilets.