
I think it's a sexist statement. Not because it's wrong, but because it's incomplete.
It could be made a basic statement to be on guard with strangers. That's a basic thing taught to kids. There was no need to bring genders in between and to push the "all men" narrative further.
I know most of the assaults and crimes and rapes are done by men but that also doesn't justify the statement. Most of the crimes in the US are done by blacks but saying "be careful with any black you see" That's clearly racist like this statement should be sexist but just because it's said with smart use of words it seems fair to most. A woman or any person should be on guard with any stranger no matter the gender. You can't judge a person just by its sex. That's sexist.