Part 2: The repair will be complete in the future... As already explained above (Opening 4), evil will only revert to good in time to come, at the end of the governmental cycle. By then all the sinners will have received heavy punishments and Israel will have been strengthened in their faith that even the lengthy exile and this great bitterness are a call for the unity of God to be revealed. Accordingly, it will be at the end of the rule of the Residue, when these things come about, that the purification of the vessels will come to an end, for this is what subdues evil and finally turns it back to good, and this is through Israel’s great faith despite the long exile.
The World's Brokenness Is Not Permanent Says Kabbalah
Kalach Pitchei Chokhmah 42:9