God was bringing judgment on Egypt. Just as Babylon was a tool in the hands of God to discipline Judah, so would it be wielded to discipline Egypt. But God has assurance for the Jews living in Egypt: Though I completely destroy all the nations among which I scatter you, I will not completely destroy you (v. 28a).
God speaks through Jeremiah: I will discipline you but only with justice. As we said just a couple weeks ago, Rabbi Abraham Heschel teaches that God's anger/punishment is never without a purpose. Its purpose is to change our attitudes and behaviors so that we can live the life God designed us to live. God cannot bless us while we are living in disobedience. His punishment provides a way for him to bless us once again.
I will not let you go entirely unpunished. God has always been clear that there are consequences for bad behavior: He does not leave the guilty unpunished (Exodus 34:7). Yet as Isaiah and Jeremiah make clear, God still loves us even when he has to punish us, and we can be assured there is a future beyond judgment.
How would it affect your attitude toward God's discipline if you really believed it was a tool paving the way for him to bless you once again?