Without the cultural context, the Hebrew Scriptures are often incomprehensible. Without the historical context, those Scriptures also seem self-contradictory.
It was well established under the Covenant of Moses that the sins of previous generations could handicap the blessings of their descendants. This was not absolute, but noticeable as a general statement of how things went on the fallen plane. It was specifically stated as the prophetic warning regarding the sins of Manasseh as the reason God had delivered Judah into the hands of Babylon. The generation under Zedekiah knew they were not quite so profligate as those under Manasseh, but that was not the point. They whined that those previous sins had put them in a bad fix, and there was no point trying to make up for it. They overstated the case.
In so doing, they offered a popular proverb about how sour grapes would cause your teeth to have a high friction. In this case, they complained their forefathers had eaten the sour grapes of idolatry, but it was they who had to deal with sticky teeth of God's wrath. Ezekiel declared they were missing the point. In so doing, he brings things down to the simplest level. What he describes are the most basic matters of individual morality, covered in Moses, but also universally applicable under Noah.
He mentions first the injustice of idolatry as the primary sin of Judah, notwithstanding it was not so extravagant as under Manasseh. Any straying at all is unjustified, since He was their only national God. Feasting at the pagan mountain shrines could not be harmless, nor was checking into the filthy idols Samaria promoted before their exile some centuries before. Then he notes lack of sexual restraint as no better, nor the petty greed which seeks every excuse to take things from others, as if it were no better than outright robbery. Instead, we should look for ways to help the less fortunate, and be prepared to forgive debts by making them love gifts. Indeed, in every situation we seek deescalation of tension and the broader peace and harmony of human communities. By such things God is pleased, and will seek ways to bring life, never mind what everyone else is doing or has done.
Obviously, the expectation is more than simply rote obedience to the Law, but embracing the higher demands of wishing others well whenever possible. Lacking such a desire brings men to destruction, particularly those directly guilty. So an unjust son cannot inherit much life from his father's justice, and a later generation of justice will purchase their own blessings. More, one who turns from such idiocy can have his previous sins forgotten. Repentance means something to God, just as turning from justice to evil means death creeps in where life once breathed.
God tips the balance in favor of justice through repentance. Does it seem unfair to your nit-picking absolutism? You have no comprehension of God, who is the definition of justice. If those in Exile with Ezekiel would turn to the simplest level of Noahic justice, they would forestall much wrath, just as those back home in Judah could do. But this whining about Babylon must stop. There was plenty of room for Judah to repent, walk justly, and reap a harvest of God's favor, but they have to accept the limits He has placed upon them. That was the real problem.