Deuteronomy 5:9
7 “You must not have any other gods besides me. 8 “You must not make for yourself an image of anything in heaven above, on earth below, or in the waters beneath. 9 You must not worship or serve them, for I, the Lord your God, am a jealous God. I punish the sons, grandsons, and great-grandsons for the sin of the fathers who reject me, 10 but I show covenant faithfulness to the thousands who choose me and keep my commandments. 11 “You must not make use of the name of the Lord your God for worthless purposes, for the Lord will not exonerate anyone who abuses his name that way.
Deuteronomy 24:16
14 You must not oppress a lowly and poor servant, whether one from among your fellow Israelites or from the resident foreigners who are living in your land and villages. 15 You must pay his wage that very day before the sun sets, for he is poor and his life depends on it. Otherwise he will cry out to the Lord against you, and you will be guilty of sin. 16 Fathers must not be put to death for what their children do, nor children for what their fathers do; each must be put to death for his own sin. 17 You must not pervert justice due a resident foreigner or an orphan, or take a widow’s garment as security for a loan. 18 Remember that you were slaves in Egypt and that the Lord your God redeemed you from there; therefore I am commanding you to do all this.
Notes and References
"... Although most scholars posit the divine attribute formula in Exodus 34:6-7 as the original locus for the statement that YHWH punishes children to the third or fourth generation for the sins of their fathers but rewards them to the thousandth generation for their fathers’ good deeds,14 the formula is reiterated in Israel’s most important legal texts, namely, the Decalogue (Exodus 20:5; Deuteronomy 5:9; compare Deuteronomy 7:9). In addition to these legal texts, the rabbis noticed that the concept of collective accountability found in Exodus 34:6-7 stood in tension with another legal text, Deuteronomy 24:16, which advocates individual accountability. (Talmud Bavli, Berachot 7a; Sanhedrin 27b; Makkot 24a. The observation of this tension is both ancient and modern, but it is important to distinguish between divinely-inflicted intergenerational retribution and human executed vicarious punishment) The attempt to reconcile these laws within Israel’s law code has spawned several modern studies that suggest a dual standard for divine and human justice. Whereas YHWH can punish children for the sins of their fathers (Exodus 20:5; Deuteronomy 5:9), this juridical privilege is not afforded to human judges (Deuteronomy 24:16) ..."
Kapfer, Hilary Claire Collective Accountability among the Sages of Ancient Israel (p. 9) Harvard University, 2013