It depends on what the conceptual reason for teaching programming is. If the reason is to teach a technical skill, then sometime after Algebra1 makes sense. If the purpose is to demystify technology, then soon after that big abstract reasoning leap isn't a bad idea (NT ~10.) If the intent is to teach executive function skills, organizing thoughts, planning, problem analysis and deconstruction, then the sooner the better.

To the more metacognitive intent, then programming adds to skillsets developed through organized play, games, regular instruction, and other structured life events. What it offers is a microcosm of planning with a strange juxtaposition of delayed gratification (have to plan first and carry out the steps) and immediate feedback (did it work.)

It may in some ways be a better bridge into executive function for kids in household situations that aren't getting those sort of scenarios with real tangible personal rewards. A classroom gold star or theoretical admittance to a college in 10 years is just not the same as successfully programming your little dude to turn a cirlce and shoot his laser while yelling "Banzai".