I always heard it as, "Those who can, do. Those who can't, teach."
OTOH, I worked at a .edu for several years (networking) and was asked to teach a course when the contracted instructor suddenly had to back out at the last minute. That led to me teaching a course or two per semester for a few years and, to be honest, I'm fairly certain that I learned way more when I was teaching than my students did. As you said, you have to be much more than just an expert on the topic.
OTOH, I worked at a .edu for several years (networking) and was asked to teach a course when the contracted instructor suddenly had to back out at the last minute. That led to me teaching a course or two per semester for a few years and, to be honest, I'm fairly certain that I learned way more when I was teaching than my students did. As you said, you have to be much more than just an expert on the topic.