That’s sage advice, but it’s worth noting that more than a few lawfully married husbands have pressured wives into abortions. In the Indian culture, for example, it’s sadly common for husbands to force sex-selection abortions (i.e., not wanting more daughters).
And more than a few lawfully married wives sneaked off a aborted their babies without even telling their husbands that the baby existed.
Sticking to marriage isn’t a 100% guarantee, but it does greatly improve the odds.