I would say that it proves less that the prosecutor is an ass (though well he might be) and more that, as the saying goes, the law is an ass. It highlights a need for the specific law to be adjusted in light of a change in circumstances and for specific detailed guidance to be given to teachers based on how the law is interpreted by the courts. The phrase "amount to contributing to the delinquency of a minor if teachers know students are sexually active" is telling and mirrors the situation in the UK.
In the UK, there is a similar issue, since the Child Protection laws could lead to a teacher being prosecuted in a similar way. However, the guidance given is very clear: in sex ed lessons, teachers teach the whole class and not individuals. In this case, teaching an approved lesson will not lead to a teacher being prosecuted, as the teacher will not know if the class as a whole are sexually active. If, however, a teacher offers one to one advice on sexual matters to specific pupils then that teacher is open to prosecution. On the occasions students have asked me for advice, I have informed them of the law, told them that I have to report it to the Named Person wrt Child Protection and taken them to her office. While there, such students can't help but notice the prominent poster showing the location the nearest family planning clinic.