How do you choose the black box if you don't understand the problem? It's not as if there exists a single black box for all possible problems.
(And no, I have not edited my comment.)
Now, there still need to be some people who understand how things work in detail, but this is much smaller than what is being taught (most k12 do not need to know maths or physics or chemistry etc). They do need practice in abstract thinkng and this would be much better done with programming (a playful, creative, logical, and useful activity).