Room for improvement? Yes, hugely. Total failure? I think that's hyperbole.
Kids learn to read nowadays at 5 or 6 (so some of them enter school already being able to read), learning to write and perform basic maths is not that hard either. The fact that you use these measures as a baseline shows that the education system is a train wreck.
Learning to write and perform basic maths doesn't seem that hard to us, but for most of human history was the reserve of a select few. Perhaps the fact that it seems so easy is actually because school can be quite effective at times?
While I did learn reading, writing and math, my writing skills were subpar and this was never spotted or addressed. More importantly most of the writing skills taught were essay writing or letter writing. The former isn't particular relevant to the writing I do in day to day life and the latter was archaicly formal. The most valuable writing skills I got from school were actually science report writing (helped a lot with documentation and communication in a work setting) and even then I've learned far more from organisational roles in my hobbies and during my career than I ever did at School (or the formal education part of uni).
You can't expect a school to teach every child every skill they need for their adult life. It sounds like you were able to teach yourself the skills you needed to succeed -- in my eyes, producing children able to self-teach is the sign of a very successful school system.
I can on the otherhand link many things I did outside of school at that time to things I learned later in life.
I don't disagree with your view that the point of school is to teach children to self-teach. But I do disagree that the school system I went through helped very much with that.
One thing that is often missing from these conversations is that arguably the goal of education isn't really to teach you any specific skill, but rather to give you the capability to learn things by yourself.
Part of this process will necessarily mean teaching you things like reading and writing, but whenever I hear "My school didn't teach me X, so I had to teach myself, wasn't my school terrible", I think "no, probably not."
(Paternalism warning:) My main take-away from that experience was that the people that I feel would benefit the most from media-literacy and critical-thinking are the ones who wouldn't have been given an opportunity to study it at secondary-school in the first place...
I'd also say that I think schools in the UK (and I would imagine other countries) totally fail at teaching essential skills required for life. Financial literacy, basic cooking skills (I did home economics but it was the same course my mother did at school 30 years prior), how to actually learn things yourself (one of the most valuable skills in my opinion), how to plan and organise yourself for life, how to deal with problems that come up in life (bills, relationships, pets, whatever), how to fix things, drive/maintain a car, how credit ratings work, the value in travel and new experiences, etc.
My comments are based on an experience from 20 years ago but it seems that not much has improved since then. I've no idea how to solve these problems and prepare future generations, but its something I'd love to help figure out. My current assessment is that youtube feels like it provides a more valuable education system than state run schools.