All my best teachers, including college, had practiced in the field. Actually your scenario is exactly what I was thinking about doing in old age given my CS teacher was math teacher that had done punch cards once in college. By the end of the class, I knew the programming language better than she did and was the one going around helping students with debugging.
(I‘m “old”. I have a masters in CS, was a SWE for 15 years, took early retirement, then came out of retirement to teach.)