The solution is to not worry about them. If they don't like it, too bad. They're not worth knowing.
There are plenty of high-quality people and friendships to be made in the world. We don't need to cling to low-grade friendships just because they're people we already know.
In extreme cases, offended people have SWATted their targets causing all sorts of physical damage and emotional distress
You can't live your life worrying about what someone else "might" do.
The teacher can fundamentally change the course of my life by limiting my ability to take more advanced courses and/or what colleges I can get into. They can humiliate me in front of my peers. They could simply make it impossible for me to learn and engage with material that could be important to my future success.
The fact that a female student has the ability to speak out about being abused _does_ upset that power imbalance, but it would be a mistake to claim that it gives her _more_ power than the teacher.
Either way, power should be wielded with good judgement, and there are certainly consequences on both for using it (and abusing it).