That woman was lucky you were willing to help her, and that’s what everyone should do.
That said, you give no advice to women who have no witnesses, and men who may be wrongfully accused.
It’s easy to take the moral high ground in your story. In the real world? Not so much.
Your advice should have been to take an issue like that to the most senior person in the building, man, woman or gerbil. They are the ones with the power to resolve it and the perspective to understand that it is important.