That's a great point, unions are really under utilized in tech and would help a ton with this. I'm not sure if forming a union is 100% of the solution though, there are powerful unions in hollywood and sexism has still been allowed to run rampant there for example. Unions are comprised of the workers, many of whom are contributing to the problem, this isn't just an issue coming from the top
That should be the women's choice to make though. She doesn't want a baby, if she has an unexpected pregnancy she will abort, so she doesn't need to take all that into account. She should get her treatment and a prior warning about pregnancy issues that could occur