I haven't read all of the posts on this thread because I'm about to go out but can get the gist from the replies on the first 2 pages.
What I find has changed immensely is attitudes towards this post covid.
My eldest had the issues described by OP, albeit at an earlier age, before lockdowns.
I put a post up then about school refusal (due to undiagnosed SEN) and basically got my arse handed to me by a lot of unsympathetic posts that either mirrored the first reply on this thread or told me that having a child at home due to their mental health was, effectively, a luxury belief. Times have moved on since then which is a good thing for school refusers and, in the case of my son, it was definitely a leveller.
I don't think schools are fit for purpose. My DS didn't attend in any effective way from years 5 - 11 because he either was running home or eventually we took the decision to give up for high school. He self taught GCSEs at home and got good enough grades in 6 subjects which was the minimum entry requirement, that, with improved mental health, he's been able to attend 6th form for subjects he loves which has been a great success.
Despite no formal schooling between years 5-11 (and very little educational engagement until the last few months before GCSEs) he applied to and was shortlisted for interview by Oxford and he did very well in their admissions test. He didn't get selected but has been offered a place at an extremely prestigious London university if he gets the grades. So it does beg the question, along with lots of others, of why bums on seats in schools is really necessary?
Obviously not all kids out of school have the outcome my DS has had but this idea that children must be in school to achieve is simply untrue.
I don't have much knowledge about the 'history of education' but was formal schooling partly to enable working age adults to work? If so the world has changed since then for that reason, but also, in terms of technology.
Like the NHS this needs someone to sit down for a fundamental rethink.