The key is keeping a direct, concrete connection between program and output. Multiple steps of abstract thinking don't work well.
Sounds like one of the old OWI MOVIT robots - they used to sell a version (I think it is discontinued but still available from some vendors) called the "Binary Player Robot Kit". It doesn't look the same as the original version in the 1980s, but the internal circuitry is probably identical.
Without abstraction/generalization capability, how are they able to learn the entirety of the concept rather than merely analyze your concrete examples?
I was part of a study where this was attempted, at about age 8 or 9. IIRC, it worked well for about half of us. The teacher totally blew my mind when she took all of my boxes and tokens, put them in her larger pencil container, and told me that my game was now just a piece in a bigger game.
At that age, you're not teaching them (programming) concepts, you're stoking their curiosity
With current US primary+secondary curricula, most non-remedial students still only get as far as differential calculus before graduating high school - electronics and discrete math are already missing from that, and "concrete programming demonstrations" would strain the schedule even more.
I did this when I was 6 with the older lego RCX brick. I didn't understand the limitations of the graphical programming language at the time because nothing I thought of was complex enough to push them. It still probably helped me understand intuitively how "dumb" computers are which can be pretty hard for beginner programmers to grasp for some reason.
Grasping the dumbness of computers can also be done via a bottom-up approach: transistors, then gates, then boolean-logic/state-machines, then binary-numbers/ALUs, then processors, and so on. "You think it can do X? Then show me how that could be built, using what you've learned so far!"
(Analogous, of course, is learning mathematics starting with a 3-column-proof-based approach, rather than ... err, whatever they call the typical American approach.)
Personally, my parents got me a Commodore 64 when I was 6, it happened to come with a copy of 'An Introduction to Basic Part 1', and I successfully worked through it.
This confuses me.
Formal operations typically develop at around age 11 (cf. Piaget); this mental capability is necessary to (among many other things) comprehend abstraction, isomorphism, algebra, recursion, and most of the other mathematics-originated components of computer science. How can children without these capabilities, possibly comprehend programming, to any extent beyond the trivially concrete?