"Filth" (tsoah) and "filthy" (ed) are rarely used in the Old Testament, only a total of 4 times. Bible hub has this to say about the figurative meaning of "tsoah"
The word once translated "filth" in the Old Testament is tso'ah, "excrement" or "dung," elsewhere translated "dung" (Isaiah 4:4, used figuratively of evil doings, sin, "the filth of the daughters of Zion"; compare Proverbs 30:12);
As I discussed in an earlier post, Isaiah 4:4 caught my attention because "filth" is aligned with "blood" in the poetic layout of that verse, suggesting to my mind the pairing "blood and sins."
In Isaiah 4/2 Nephi 14, we also learn that those who remain in Zion will be called holy.
3 And it shall come to pass, they that are in Zion and remain in Jerusalem shall be called holy, every one that is written among the living in Jerusalem—
4 When the Lord shall have away the filth of the daughters of Zion, and shall have purged the blood of Jerusalem from the midst thereof by the spirit of judgment and by the spirit of . (2 Nephi 14)
The temple covenant cleanses Zion of blood and sins.