I sort of agree with you about the idea of learning "to code", but I do think kids should learn something about how all this technology around them works, not as a potential career path but so they are just a little less ignorant about the world.
And I completely agree with you about my job not being about writing code, it's about solving problems, with some code.
But of course the arguments against learning this sort of thing in school would apply to about 3/4ths of the school curriculum.
Learning History, Geography, French, German, Woodwork, Games, and the vast majority of the science I was taught has provided almost no direct benefit to me in my career or my job as a developer. And frankly the same goes for the majority of the maths I was taught. I've used trigonometry once since education.
But learning all these disciplines (however badly in some cases) has taught me a) about the world I live in and b) new ways of thinking. I think teaching kids at least the basics of how computers actually work, perhaps as a facet of other subjects, rather than just how to use them, will be important in the future.
The tech around us has achieved Clarkian levels of magic for the vast majority people, and even most of us who have a fundamental understanding of it all don't really understand how it all works.