I'm a full time developer, mostly C++.
A few years ago I had the opportunity to teach a C++ class for three semesters at night, at the local community college.
The first semester was very hard work, I probably prepared for four hours for each hour of class. The second semester was a bit less stressful, but still took a lot of my time.
It wasn't until the third time I taught the course that I felt that I was delivering a good product to my students while not spending all my spare time on class preparation. By that time I had essentially written my own textbook for C++ 101.
Money wise, if I assigned any value at all to my time teaching was a loser. Community Colleges pay almost nothing to adjutant instructors. Yet they often have many applicants for each adjutant teaching slot. Why?
I think it helped me professionally, it made me a much better C++ developer. And it's fun working with the students, at least with 99% of them. Most of the students in my classes were working adults who were highly motivated. Every class had at least one 'ringer', another professional C++ dev who for some reason was attending this class on his company's dime. These 'students' kept me on my toes, but I wonder why their company would pay them to take a class that they were clearly overqualified for (I'm looking at you IBM and Apple).
I'd probably still be doing it, except the department head who hired me was replaced by another full time professor who brought in her own person.
I'm 59 now, my kids are grown, my house is almost paid for. I'd take a Community College teaching gig in a heartbeat now if I could find one. At this point in my life I could take the huge pay cut. Ten or twenty years ago? No way could I have afforded to teach full time.