I can buy it.
"As recently as 1999, it was widely believed by medical professionals that babies could not feel pain until they were a year old, but today it is believed newborns and likely even fetuses beyond a certain age can experience pain"
The other thing that people have to do is drawing lines, life's issues are otherwise overwhelming. Now, where they draw the lines differ widely. It's common to take external markers and make the separation according to that - a safer bet, given that others can see those markers as well, and so, maybe more readily validate the discrimination. Skin color, gender, age, signs of sickness, mental conditions are easy targets for this. In most cases, they are coupled with vulnerability as well, so the history of their abuses is as old as humanity itself - hence I don't think it's that wild that people think such a thing. Unfortunately they think the wildest things, myself included. It's actually quite scary to me.
I do not buy that a significant number of people nor practicing pediatricians ever thought babies can’t feel pain. This claim that it was “widely believed” babies didn’t feel pain is a narrative that prioritizes the opinions of a few academics, who were wrong, above the opinions of parents globally.
The same is true of the abstract idea of drawing lines. If you say that people drew lines and it lead to abuse, and therefore it’s wild what “people” believe, you are talking about the abusers who were wrong. The people on the other side of those lines didn’t have such wild beliefs, but the framing of your story is implicitly ignoring them. You’re choosing to focus on the “wild” beliefs of one group and make that the conclusion of your argument on human behavior. There’s another story you’re not telling where “people” did not have “wild” beliefs, and turned out to be right.
It’s not clear what “widely believed” means; what evidence there is for that claim, or who its referring to, or how many people it’s talking about. They don’t mention that it was widely believed by many others that babies do feel pain, nor how many of those people there were in comparison. Just because a few academics argued about it at conferences doesn’t mean it was actually believed by a significant number of real practicing doctors. Some academics have a very bad habit of thinking nothing exists outside of other recent academic papers they can reference in their own language.
BTW why does the Wikipedia link cite 1999? The paper arguing babies feel pain is from 1987. Digging further, the academic idea the babies didn’t feel pain seems to have originated in the 1940s with some academic papers that had methodology problems. So what about before that? If the assumption was babies did feel pain until then, summarizing this as being a belief that changed in 1999 is totally misleading. What about other countries? Was this temporarily incorrect belief about babies shared by doctors in Asia, Africa, and India?