It is very upsetting for some people. Some people are able to cope with those thoughts, but for a lot of people, that is very distressing.
What we know is that obsessive-compulsive disorder, which is the mental health condition most likely to arise as a result of these kinds of thoughts, may impact as many as 17% of postpartum people. That is not exclusive to the thoughts of hurting your baby on purpose but also encompasses thoughts that the baby may be harmed by accident.
As a first step, what we really want to know is this: If we educate people prenatally about these thoughts, how much of that will be mitigated? I think that's the most important first step because you may be able to get a long distance from just doing that. Those, then, are the people who are going to require some treatment postpartum.