Very simple. You need S3OC and S3PE.
This method will totally hide a particular item (hat hair, or anything else) from CAS. If you just want to hide one or more presets, like my mod, let me know and I can explain it to you - it's a bit more complicated - or you can use MasterController's "Compact CAS" setting to do it all automatically.
Under the Cloning menu, hit (experimental) CAS Part.
Find the hair you want to hide. This is easier if you know which EP the hair came with, since all the hairs have the EP in the name. They also have the age and gender in the name; p for toddler, c for child, a for teen/young adult/adult/elder; and f for female, m for male. So an adult male hair from WA will be called amHair_EP1_Something. Click a hair in the list to see a preview.
Once you've found the hair, click Clone or Fix.
Untick Renumber/rename internally, click Start, save your file somewhere you'll remember.
Wait. When the cloning process has finished, click "No" to "Do you want to keep working in S3OC", and close S3OC.
You now have a default replacement of the EA hair. Problem is that it's exactly the same as the original. So to turn it into a hider:
Open the file you just saved in S3PE.
If this is the first time you've used S3PE, tick Names and Tags in the bottom of the S3PE window.
Select everything in the list of resources except the resources tagged CASP and _KEY, and hit Delete.
Select the CASP resource, and click Grid at the bottom of the window.
Now you have two options.
If you want the hair to be hidden in CAS, but for townies to still be able to wear it at random:
Click the + sign next to ClothingCategory.
Scroll down to " IsHiddenInCAS", and use the arrow at the end of the line to change the value to True.
Click Commit (bottom right).
File -> Save.
If you want the hair to be totally gone from your game, so no sim will ever wear it again:
Click the + sign next to AgeGender.
Find all the lines which are set to True, and use the arrows at the end of the lines to change them to False.
Click commit (bottom right).
File -> Save.
What I lack in decorum, I make up for with an absence of tact.