22 The punishment of thine iniquity is accomplished, O daughter of Zion; he will no more carry thee away into captivity: he will visit thine iniquity, O daughter of Edom; he will discover thy sins.
[AD 1274] Thomas Aquinas on Lamentations 4:22
Here in Verse 22 the Jews are consoled. And first, as to their liberation. As said: "The punishment of your iniquity, O daughter of Zion": as purged by punishment.

Then: "he will keep you in exile no longer." That is, for past sins, providin~.. you do not repeat such sins. As Isaiah 40:2 declares: "Speak tenderly to Jerusalem, and cry to her that her warfare is ended, that her iniquity is pardoned."

Secondly, (the Jews are Comforted) by even the punishment of their enemies. As Verse 22 concludes: "but your iniquity, O daughter of Edom, he will punish ." That is, like a judge, or as one questioning- the very claims: "He will uncover your sins." Namely, showing them through punishments. As Jeremiah 49:8 says: "for I will bring, the calarnnity of Esau upon him, the time when I will punish him."