That’s essentially what the commenter is proposing when talking about banning birth control. This would be equivalent to compelling women to reproduce (or forego sexual relations, which in reality most people won’t do).
Most actively wars are over long before the replacement rate starts to matter, and women that get pregnant or raise children will in all likelihood get an excemption from frontline duty.