First, is the statement in v. 4, "the Lord also executed judgments on their gods." The plagues that God brought against Egypt were not random weird things. They weren't based on some biological progression as some would suggest with the blood in the water causing the frogs and the frogs causing the flies, and so forth. Each of the plagues was uniquely designed to address specific false worship of the Egyptians. If you're interested in learning more about the specific false gods and how each plague related to one of them, this is an interesting website: http://www.stat.rice.edu/~dobelman/Dinotech/10_Eqyptian_gods_10_Plagues.pdf
The chapter ends with this warning, "And what I intended to do to them I will do to you.” God makes it very clear that He is sending the Israelites into the Promised Land not only to bless them, but to execute judgment on a people who have become hopelessly corrupt. Deuteronomy 9:5 explains, "It is not because of your righteousness, or even your inner uprightness, that you have come here to possess their land. Instead, because of the wickedness of these nations the Lord your God is driving them out ahead of you in order to confirm the promise he made on oath to your ancestors, to Abraham, Isaac, and Jacob." Romans 13:1b assures us, "For there is no authority except by God’s appointment, and the authorities that exist have been instituted by God."
God is sovereign over nations. But we often overlook the first sentence in Deut. 9:5 - "It is not because of your righteousness." When God has blessed America, or any nation, it is not because we have it all figured out and are doing such a great job. His ways are higher than our ways and He often has purposes for our blessings that have nothing to do with us at all.
But when a nation becomes so completely corrupt that it turns its back on Him, makes a mockery of worship by equating it with demonic notions like idolatry, sexual promiscuity, and abuse, or supremacy, which denies that all are created in the image of God, His Word and history confirm there will come a day of reckoning when He brings judgment. God's Word is clear that He brought judgment on the nation of Egypt when He freed the Israelites. He brought judgment on the Canaanites through the conquest by the Israelites. And later, when the Israelites had embraced sin and turned to idolatry, He brought judgment on them through the Assyrians and the Babylonians. God's chosen people were not chosen because they were special, they were special because He chose them. In the same way, American exceptionalism often assumes that God has blessed this nation because we are exceptional. Anything exceptional America has accomplished, has been because God has blessed us.
Any number of verses from Jeremiah about our need for repentance might apply, but this seems most applicable, "You [we] also have done all these things, says the Lord, and I have spoken to you over and over again. But you have not listened! You have refused to respond when I called you to repent!" (Jer. 7:13) May we repent individually and collectively over the ways that we have grieved the heart of God.