You pick two very different scenarios in your OP...adultery and addiction.
Some would make the point that, whereas heroin addiction, by definition, will render a person unfit to teach (because they would be too strung out to do anything), adultery would not.
But, kids who are being taught by Mr. Jones who has been openly living with Mrs. Smith for some time now, will grow up thinking, why that's not so bad, Mr. Jones and Mrs. Smith did it, and Mr. Jones was my favorite teacher.
Same as a homosexual teacher. One of my own favorite teachers, Ms. Leach, was lesbian and lived with a woman. Didn't affect her ability to be the best PE teacher ever, and no, she didn't check us out in the showers, being in a solid relationship and not given to pedophilia.
However, many right now are probably cringing to think of a lesbian being a girls PE teacher back in the days when one had to shower before going back to class.
So, perhaps we should ensure that no one who has obvious moral issues should teach children...
But, this must include those who are Christian as well, because I submit a Christian who practices lawlessness is even more insidious than a non-Christian who does so. Because then, not only will the young mind think that the immoral issue is OK, they will perceive that even God is OK with it.
So, lets come up with a list of all things lawless that people practice and make sure that anyone who practices these things can never work with children...
And, so that we don't fall into any "Noahide" traps, let's just cover lawlessness and unrighteousness that is identified as such in the New Testament.
Adultery
Fornication
Homosexuality
Addiction
Gossip
Anyone who practices idolatry. You know, Strangelove, we truly do have to eliminate anyone not a Christian because idolatry is listed in the New Testament as unrighteousness right up there with adultery and homosexuality. But, this can be a tricky one, because we also know that idolatry is putting anything as being more important than God, so even a Christian who is shown to love their spouse or children or home or job more than God must be included.
...But, we don't want to be unfair and just throw out anyone who looks like they might be an idolater, that would be Phariseeism, (not to mention unAmerican!) One is innocent until proven guilty. How to prove that one loves their spouse, child or job more than God...perhaps a test like how much "quality time" one spends with God as opposed to one's wife, children etc.? Naturally, anyone who worships "Mammon" (has too much of an interest in getting money) is guilty of practicing idolatry, so all rich people will naturally have to prove that, even though they are rich, they are not guilty of idolatry.
Anyone who covets. This would be anyone who desires their neighbors wife (or husband) and/or possessions. Note that this just includes the desire, actually taking one's neighbor's spouse or possessions is covered under the laws against adultery and stealing. Be sure to catch up one what Jesus had to say about just looking at someone else with lust.
Anyone who rails or reviles another. Definition of railing or reviling...verbally abusing others, speaking against them with contemptuous language or to utter bitter complaints or vehement denunciations against another. This would eliminate me from teaching anyone from 6th grade onwards, because I can't imagine spending days on end with your average teenager and not breaking this one fairly regularly. But, it would also include anyone that vehemently denounces others, and, since the New Testament does not differentiate between people, this would include our Presidents, famous televangelists, etc.
Gee the list does go on doesn't it.