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.
Room for improvement? Yes, hugely. Total failure? I think that's hyperbole.