I am not exactly sure how to get rid of bad custom content via CC Magic other than to dump out the Sims 3 folder and go through the files and test that way. Here's what information I do have that I hope helps.
If you have Girl Doll Dressed or the Arezzo Cabinet, you can get rid of those by going through your mods and custom content files in small batches and deleting the cache files.
For reference those cache files can be found in (Documents\Electronic Arts\The Sims 3) folder and are:
CasPartCache.package ; compositorCache.package ; scriptCache.package ; simCompositorCache.package ; socialCache.package
More detailed tips in the post linked below:
Sims 3 - How-To: Fix Problems with Mods/CC
https://www.carls-sims-4-guide.com/forum/index.php?topic=31759.msg506010#msg506010Added Notes and Tips:
Every now and again I'll download something from the Exchange... Yes I know -bad- idea. lol and find the doll or cabinet in my Sims 3 folder.
I do download .Sims3Pack files to a temporary folder on my desktop and then install them into a new Sims 3 folder to make sure the files don't infect my main game. Plus I can then find and delete the doll and cabinet faster.
To create a new Sims 3 folder, go to: (\Documents\Electronic Arts) - right-click on the Sims 3 folder and select Rename. I usually rename it something like Sims3-old or Sims3-1. Everything is safe in your old Sims 3 folder.
Launch the game and exit it so it creates a new folder.
You get lots of "goodies" from the Exchange. lol I've learned from that experience to install into a new Sims 3 folder to see what "goodies" you end up getting and then get rid of them so they don't attach themselves to anything in your main game.
=====
Reference Links:
Corrupt Files on the Exchange:
https://sims.fandom.com/wiki/Corrupt_file_on_The_Exchange Arezzo Bathroom Counter:
https://sims3.crinrict.com/en/2014/02/arezzo-bathroom-counterright.htmlBad CC 2013:
https://findingbadccsims3.blogspot.com/2013/05/bad-cc-2013-arezzo-cabinet-and-other.html