So by indirectly violating the rules and send a political message by asking all the men to leave, how do you think hamas will react? Do you think they will appreciate that you get people (and media) to question the religious rules? It doesn't sound like people who enforces their religious beliefs with guns aren't going to be happy with political activism, be that indirect or direct.
Maybe the best way to combine a hackathon and political activism is to hold them in places where people do not shot political activists. Its not the best choice, but what is the alternative?