I am not sure if this is a troll but this is a terrible analogy given the nature of coding and the impact a strong engineer can have on a product, team, or business just through raw programming skill.
A CTO should have at some point been a strong engineer, but IMO once you gain the title of CTO you should broaden your perspective and focus on higher impact activities (and yes, there are activities that have higher impact than raw programming skill).
The analogy I use is that a CTO doing coding is like a CFO doing invoice processing or a COO dealing with routine office management matters.