I wonder how much of a role culture plays in this as opposed to economics. We say that the reason kids worked in factories and were sold was due to economic hardship, but most people wouldn't find that acceptable nowadays even when they are going through economic hardship. I guess the reason why we care less about the economic aspect nowadays is that we have enough social services that will at least minimally take care of the kids if necessary.
Actually not so long ago countries like Sri Lanka and Colombia made a lot of money providing "orphans" to couples who wanted children in Europe. Caused quite the scandal.