My understanding is you cant filter for "XX"'d/damaged clothing at a stockpile.
The minimum coverage with clothes is footwear bodywear and legwear, so for me, leather shoes, plant fibre shirt and trousers (pig tail or rope reed).
If you only ever make these items eventually all your dwarves wil have their other items, gloves, hoods cloaks etc "rot off" and not get replaced due to there being no replacements. They will get a bad thought from "wearing worn clothes" or having "clothes rot away" but once they are gone that bad thought will not return, and the shoe/shirt/trouser will suffice for their needs.
Immigrants do tend to arrive wearing extra items than shoe/shirt/trouser, again hoods/cloaks/gloves.
I usually dont need to make clothes for a few years in a new fort, then I chuck out batches of 10 shoes/shirt/trouser when I start to notice clothes being dropped around the fort. I might then take a look at my dwarves inventories (u for units, then c to zoom on a unit then i to see inventory) and see if everyone needs new clothes or just the longest serving dwarves. After that I just tend to keep 40-100 "full clothing sets" depending on how many dwarves I have in the fort. Clothes equipping is far from ideal, there are many quirks, and tbh its a bit of a ball ache but then, maybe everything shouldnt be so easy.
I read that dwarves try/tend to "collect 2 sets of clothing.
Cabinets in bedrooms help with clothing not being left everywhere but also sort of hide those first damaged clothing "appearing" on the floor of your fort.
Hope some of that is helpful
Good luck
EDIT
in my current fort ive just about gotten everyone wearing steel armour. This does not wear out like clothes and does provide "coverage" preventing unhappy thoughts from lack of clothes.
The military equipping can be fiddly also.