Let's say you are successful. Let's say a class of companies are successful at this strategy. Lets use the example of faangs which are desirable places in terms of salary/brand. If faangs were successful at this that would reduce the % of female developers in other industry and assuming faangs are taking the best candidates that leaves the worst ones. Which then creates this reality where male programmers outclass female developers in these other industries. That makes it harder for women in general and makes this false impression that females are not as good as males.
To help women you really need to treat them equally. Trying to reach a goal of unhealthy unnatural % industry wide means women will left holding the bag when the music stops.