No one will be punished for the sins of other person unless he approves it. The person who approves and agrees with any act whether good or bad, will be partner with the person who did it.
The bad effect of major sins falls on those children who agree and support it only and not on those who are against the wrong. Mohammad Ibn Abu Bakr was one of the pious followers of Ameerul Mo'mineen, despite being son of Abu Bakr who took the right of Khilafah from Ameerul Mo'mineen and deprived Fatimah from her right in Fadak.
A Mo'min by the name of Sa'd al-Khair from the family of Bani Umayyah came to Imam Mohammad Al-Baqir (AS) and he was weeping loudly like a woman. Imam asked him: What makes you weep O Sa'd? Sa'd replied: Why I should not weep when I belong to the cursed tree according to Quran (Bani Umayyah)? Imam replied him: You are not with Bani Umayyah, you are with us (Ahlul Bayt), did not you hear what Allah says in Quran (Whoever follows me is from me).
al-Ekhtisas by Shaikh al-Mofeed , page 85.
This means clearly that the children of the criminals are not responsible about the crimes of their parents or grand parents as far as they do not agree with the crime.