There are plenty of other ways to have children that don't involve procreation, and childbirth itself isn't pleasurable by any means (unless you're a rare one really into that I suppose...), so children would definitely still be born even if sex wasn't pleasurable.
Most people don't have sex to have children, it is pleasure for them. Precautions should always be takin to ensure there is no way of getting pregnant.
I don't know if I'm completely antinatalist, I'm asexual and have severe tokophobia so I'm against the idea of pregnancy in general.
I always found it personally unfair and inherently selfish to have biological children, especially if you have hereditary disorders because now that child may have to live that same way which, because I'm one of those people, is Hell. There are plenty of children that already exist without families! Adoption is a better option, and if that child also has some hereditary disorder from their own biological parents, the guilt isn't on you as you're not the one that afflicted them with such a thing.
I have looked and seen what parents on this forum have said, giving their input into discussions like this. I understand their viewpoints, but they're speaking from already having lived that way. It wouldn't be right for them to feel opposite. Idk if that makes sense though, explaining it myself. uhmm.
Either way, in the beginning, childbirth was always about carrying on the family bloodline, usually through royalty. Regular families with no ties to higher beings in power shouldn't care so much about "carrying on the family name", as in most societies, that just isn't a thing anymore. At that point it's just selfishness.
So yes, people would still have children even if sex wasn't pleasurable at all. As a societal expectation, a religious expectation, and just wanting to be parents in general. Why do people want to be parents? I don't know. I honestly can't fathom it myself. The idea of taking care of a small creature that needs way more needs and attention than a pet animal, gives me extreme fear.
I also always found it mildly amusing that carrying a fetus for over the proper term eventually kills the "host", like a parasite that you're not supposed to have in the first place.
But also... idk. I think babies in general are weird to have and despite my disagreements to force beings into existence that can't even ask for it (speaking completely from how I feel about myself and others that share my sentiment), to have a small baby hold your finger in their tiny hand makes the world feel a little less painful.