This is from a Shia point of view
This is a statement I found from hubeali.com:
It is narrated from Amir-ul-momaneen that a child gets ill if the mother commits a sin.
(Huliya-tul-Mutaqeen, Allam Majlisi, Urdu translation, pp.144.)
Question: Is this belief in Shia Islam true and why do they believe this?
If they do believe this, then children will be harmed and the only way to stop it is to not sin so a mother would have to commit no sins but that is impossible for a normal Muslim to be infallible.
Abu Huraira reported:
The Messenger of Allah, peace and blessings be upon him, said, “By Him in whose hand is my soul, if you did not sin Allah would replace you with people who would sin and they would seek the forgiveness of Allah and He would forgive them.”
Source: Sahih Muslim 2749
Grade: Sahih (authentic )according to Muslim