I still remember my days as a middle school teacher. Good luck getting them to NOT think, talk, write, text, and sometimes engage in sex. Even in the 70's, we caught middle school students engaging in sex and all kinds of hugging, grinding, petting, etc. It was much easier to deal with it instead of trying to ban talking about it.
As a science teacher, I sometimes had to participate in sex education depending on the curriculum du jour. In our school, parents could opt out, girls and boys were separated, etc. Well designed sex education was usually appreciated by most parents. Believe me, even at the HS and college level I've seen plenty of misinformation, pregnancies, and harmful exploration - mostly because young adults still need lots of guidance as they become more independent.
Sometimes hilarious things happened, like the time the rising 8th grader middle schoolers had HS visitation day to get ready for the next year's move, and it happened that the HS was handing out condoms that very day! They were going, "wow, we can't wait to get to HS!" I think that snafu ended up being discussed at a school board meeting.
As the annual and newspaper advisor, I approved the kids (creative ones) desire to get staff t-shirts. They wrote things like "Photographers do it in the dark" (we developed film in those days) and "Editors lay it out". The principal had to rule if the shirts were "obscene". Actually, he let them wear the shirts as long as the parents approved and there were no curse words or explicit language. He was well aware it was typical behavior for 13 to 15 year olds.
Honestly, you wonder if parents really raise their kids in a closet. Putting teachers in jail for presenting material to minors that is harmful, including any description, exhibition, presentation or representation, in whatever form, of nudity, sexual conduct, sexual excitement or sadomasochistic abuse when the material or performance...is pretty insane! With rare exceptions, people should thank middle and HS teachers for all the guidance, tasteful instruction, moral education, and counseling that the state and parents never knew happened that helped their kids grow up informed and making safe choices.