New York City regularly suffered from all sorts of plagues. Sometimes things just overwhelmed the government and social welfare groups so they’d round up the surviving children and put them on trains to the Midwest called ‘Orphan Trains’
I lived in North Dakota in a previous life and the demand for agricultural labor was so great in the late 1800's, that Dakota Territory (and later the young state) actually sent agents to the big cities on the east coast to try to recruit new settlers with little success. One of the exceptional success stories was our future president Theodore Roosevelt. Their next stop was Europe, where they met with a lot more success.
A young orphan was ideally suited to this sort of thing. A childless family (or one with two few children) would get an extra farm hand and the orphan would get a new life.
Not a perfect solution, of course. And there were abuses. But all-in-all, a far better solution than butchering unborn children in the womb.