I once got two crime novels as a gift where I could see from the cover text that the first murder victim was probably a child -- I exchanged those books for something else (a multigenerational saga with strong romance elements, if I remember correctly

). I've also abandoned a well-written book by an author I like because it became obvious that someone who hated the protagonist was plotting to kidnap her toddler child. I'm sure she'll rescue her child, but I couldn't take the slow, painful build-up to the kidnapping. When the child's favourite toy disappeared from their bedroom I put the book down.
I've read and liked dystopias and novels from horrible historical and current epochs, where lots of people including children are harmed, so I'm not sure exactly what makes me balk at these. I think it's the slowbuilding looming dread combined with harm to children that I can't take.
I've also abandoned a book for blatant sexism, to the extent that all the female characters were terribly written. I can take a lot of sexism, I've read and enjoyed books written two hundred years ago, as well as modern books where the author introduces the first character who is a woman, has a name, AND speaks, on page 200, but this book hit my limit. (It's written in 1931 by an author who was a fascist, so in hindsight it's not too surprising that I didn't like it.)