The problem is the lack of "real" programming classes and the false sense of accomplishment a child can get from "doing well" in the fake programming class. You can balance on one leg?! You're going to be a great gymnast! The even bigger problem is the crazy high amount of Dunning–Kruger effect going on in the programming industry as a whole. Someone may not know they're bad at programming until it's too late.
Letting children try new things to see if it's not only something they like, but something they do well at is a great idea. The elephant in the room is the "doing well at" part. Even CS professors at ivy league Universities are pretty much all saying that 80% of their graduates should not do programming, but they can't fail them because they technically passed. And that 80% is already after the first 80% of failed to graduate. This means that about 96% of people who apply for programming can't or shouldn't. And that's after weeding out all of the other people by having high requirements just to apply.
Then you have the other elephant in the room. Dunning–Kruger effect is a side-effect of a lack of meta-cognition, which is intern a lack of fluid intelligence, which is required for abstract reasoning, deductive reasoning, and inductive reasoning. Of which all 3 are fundamental requirements for any good programmer. There are no known ways to increase fluid intelligence, only ways to get better at specific fluid-intelligence tests, but the benefits are non-transferable, aka don't actually help.
As far as we can tell, increasing fluid intelligence requires meta-cognition to recognize what you don't know and why you are failing, but at the same time, it takes high enough fluid intelligence to have the meta-cognition to do so. It's a catch-22 where people below a threshold have virtually zero ability and those above it are exponentially better for small improvements.
If we want children with better fluid intelligence, one possible way is we need to start them very young on being very introspective about their own thoughts and reasoning.