One of the most distressing phenomena in our days is the proliferation of stories about rabbonim and mechanchim who acted with women and girls in completely inappropriate - or better, criminal [at least according to halacha], ways.
The Internet compounds the problem because the Chillul Hashem is magnified when everybody knows about it. How can it be stopped?
Ideally, men should not be teaching or counseling women. A guy is a guy whether he has a beard and payos or not. אין אפוטרופוס לעריות. If a person wants to satisfy his appetite - nothing will stop him. The yetzer hara is more powerful than a line in the shulchan aruch. It is not only the men's fault - sometimes the women fall for the men. People are only human. That explains why the earth is populated with 7 billion people [including many of our "cousins" who don't exactly fit into the category of "human":-)].
The problem is that men need parnassa and teaching women provides parnassa. Another issue is that men generally know a lot more Torah than women and are thus more qualified to teach. [Men don't know more because they are necessarily smarter but because they spend far more time in the beis medrash than women.] Another issue is that men are more authoritative than women are in the eyes of the students for various reasons and thus make deeper impression on the students. Rebbetzin Kniyevski was a tzadekes but nobody viewed her as an authority as they do her husband.
I still think that it is bi-dieved that men teach women [I myself did so and viewed it as bi-dieved and am happier today having no parnassa than I was when I received the extremely minimal amount I received. In order to make a semblance of a living teaching in Seminaries one must teach in 10 seminaries....]. Once they are already teaching, there must be guidelines that go beyond the regular halachos of yichud. The details are not the point of this post but there is definitely too much close contact between teachers and students [in many cases] that must be curbed.
There is always a male/female tension present and this often leads to misunderstandings. This can be prevented to a certain extent if there are proper boundaries. Not every male is a predator. 99.9 percent are not. Not every rabbi has a personal interest in his students that are not pure and holy. A mature man is not interested in 18 year old girls. But there are good people who fall, there are moments of weakness and of that we must be wary.
Seminaries would also be wise to conduct extensive background checks on their teachers. Many of them do not.
In conclusion - steps must be taken to curtail the amount of horrible stories we hear about all too often.