It's only a thought experiment, it is in no way insinuating at all that all violence against women is by men outside the home.
It does give pause for thought - and it is male readers of the answers who should be having the biggest "aha!" moment here - about what strategies women adopt for being out at night, and the things they avoid doing because of their perception of danger. What the question does is take away the danger and ask what you would do differently, or at all, if there were no men around.
It's a very simple and basic premise, actually.
Now. If we then had a follow up that said something like, should men with female partners be separated from them in the evening/overnight - or not live with them at all or something - to highlight the fact of how dangerous it is to be a woman with a partner, that should also give all of us something to think about.
Nobody is suggesting for ONE minute that all men are like anything. (it's like the trolley question that philosophy students get confronted with - in so many bloody iterations now. Nobody ever starts their answer with "well not all people who push people off bridges are…" or "what's the gender of the 5 people down the line…" because it's not the point of the exercise)