school grades, as maria montessori put it, are "small minded blackmail attempts".
kids don't learn because of good grades. primariy they seek justice.
while a teacher can prefer a busy but unintelligent school girl, a computer won't do that.
when coding, your result can basically only be a working prog or not.
no teacher required to tell you if your prog is working.
you get your reward from the computer: joy of creating something.
psychologically seen, to learn that what you are doing creates impact is the very basis of learning.
if you give your child Mastery, Autonomy and Purpose
* some tools and an environment to start with
* freedom to try and fail without waiting for a teacher to answer questions and
* a good reason to learn,
after a very short time you will see someone who does not need "extrinsic motivation" and explanations. be prepared for more questions than you can answer.
maybe, the garbage man will still be the garbage man in the end. but possibly see ways to improve his work or at least look forward to his side projects after work.