Anecdote from my brother: He was struggling with French language classes (because he was lazy), so he switched schools to something you technical high school, where you would get less of a humanistic education (less history, less languages, less cultural stuff) and more technical topics.
He had learned to program by creating Minecraft plugins and really excelled there. Soon he was allowed to do homework of other subjects in the programming classes, because the teacher told him everything he could.
When I visit my parents I often give him some nudges like "yes, indentation does matter", or "or google design patterns", but I try not to tell him what to do, because of this: The other children in his programming class are just as miserable as he was in his French classes, failing easy tasks, because they are just not interested in them. While they will certainly learn on a basic level, how programming works so the won't think of Matrix screens like I imagine most others do, I don't think they will be able to grasp or remember concepts like OOP or even recursion.
I think schools should focus on getting the basics right and improving the chances of lower class children. When they have that covered (which is hard enough), they should just focus on accessibility and encouragement to get the children to find something they can be good in by themselves.