The simplest answer is:
Hashem didn't smite all wicked Israelites per se. Rather HE smote those who were so immersed in Egypt (mitzrayim) that they wouldn't leave for Israel.
Thus the chessed n'urayich of Yormiyahu is "Lechteich acharai bamidbar". The zechus was the willingness to forgo Egypt and follow Hashem into the wilderness. It did not preclude that amongst those who left there were those with OTHER character flaws.
Sometimes in a crisis it is that ONE essential character trait that overshadows other failings to the point that one earns redemption. And conversely, one fatal flaw may way heavier in a given context. Those Israelites not ready to leave Egypt might have been left alone had the Exodus not forced the issue!