In my own experience as an employer, I have found that you can often avoid much more serious, prolonged experiences of harassment and violence in the workplace if you are able to address incidents as they start to occur.
As you point out, sometimes people don't realize the effect that their words or their behaviour is having on their employee or their colleague, in particular when you have differing positions of power. I always say that we're all managers now. We were elected and we all have staff now, but not all of us have come to this place with the same set of experiences. Sometimes being a good leader isn't organic. You sometimes need to learn how to be a good leader. Those informal processes allow for that process to say, “Did you know that your behaviour is having this negative impact?”
It depends, of course, on the severity of the situation. At any time, if someone feels that their safety has been jeopardized or that they need to involve the criminal justice system, they have the absolute right to do that, and we encourage people to do that, but so many times it could be a case of someone's unwanted touch on the shoulder, for example. That's a common thing: “He regularly messages my shoulder on the way to his cubicle.”
Maybe that person doesn't understand that that touch could be threatening. It's quite possible. Sometimes, if you have received a complaint, you can take it up with the individual and say to the person through an informal process, “Do you realize that when you touch your much younger colleague or you touch people in that way, it may have another meaning to them and they're not comfortable with that touch?” There may be ways you can deal with it and prevent the behaviour from escalating and continuing over many years.