First of all, the Word of God emphatically tells us that we cannot inherit the guilt of other people (Deuteronomy 24:16; 2 Kings 14:6; 2 Chronicles 25:4; Ezekiel 18:20). In other words, God holds us accountable only for our sins, not those of other people. We are judged according to our conduct (Exodus 32:31-33; Romans 14:12; 2 Corinthians 5:10; 1 Peter 1:17; Romans 14:12), not the actions of other people. We are clearly held responsible for our own choices. As a matter of fact, Jesus indicated that children are in a sense better models of purity than adults (Matthew 18:1-5; 19:13-15; Mark 10:13-16). Though we have inherited a sin nature from the fall of Adam and Eve, behaviors are learned and chosen.
The two parallel passages recording the Ten Commandments do not say that God would give generational curses to people. Rather, God would cast judgement on idolaters. That sin would contaminate future generations through parental influence. God punishes people who continue in their sin and rebellion against Him. He also shows mercy to those who love Him and keep His commandments (Exodus 2:6). Consequences can be passed on to future generations, not curses. The forgiveness of God and salvation is not beyond the reach of anybody. There is a "curse" only in the sense that moral corruption has been passed on to mankind as a result of the fall of Adam and Eve in the Garden of Eden. Atonement is available to all through faith in the Lord Jesus Christ. He bore the "curse" on our behalf (Galatians 3:10-13).
If we can inherit the sin of our parents, then would that also mean that we could inherit their righteousness? Can we inherit the mercy of God? The idea that people can inherit hexes or curses from their parents is both irrational and unbiblical. It is nothing but pagan superstition. If one walks according to the Spirit through faith in Jesus Christ, then there is no condemnation (Romans 5:1-11; Romans 8:1). This generational curse nonsense has no doubt caused much unnecessary fear and anxiety in the lives of professing Christians. The Lord is faithful, rich in mercy, abounding in love, and slow to anger (Exodus 34:6; Psalm 103:8-14). Our fellowship with God has nothing to do with our family ancestry. If it did, then that would make Him a respecter of persons (Acts 10:34). Nowhere does Scripture even provide us with instructions as to how to break so-called generational curses.