It's obvious to me that the OP was suggesting a thought experiment. Not something that could be done in reality but a question get us to think differently about what we accept as "normal".
With that in mind, what is really interesting is seeing how the idea that men might be inconvenienced by having to stay home because of the actions of (other) men has triggered cries of "ridiculous tripe" , "it's not fair", "punishing the innocent", and most interestingly "what about their jobs?".
Because every night, for hundreds, thousands of years, all over the world, women, not all women, not all of the time, but plenty of women, plenty of the time are already restricted by the need to avoid being alone in some public places at night, are not doing things they'd like to do or not applying for certain jobs because they do not feel safe travelling to and from them, because of the actions of these (other) men. And that is just ... "normal". Apparently no one can do anything about it because that might restrict innocent men. So hey-ho, what you can you do, and the women continue to stay at home or stick to the safe spaces.
Seems it's only "ridiculous", "unfair", "punishing the innocent" when it's suggested that men might be limited by (other) men.