Questions about NPC spawning

I have been trying to make a mod that adds in a series of outposts and villages with distinct clothing for men and women. I have been running into difficulty, as when I spawn an NPC class and assign it a specific gender, it still possesses the names seen of both genders.

The other issue I have been having is with making clothing spawns specific to one gender or the other. As a stopgap, I made two different NPC classes, one for each gender, with different clothing overrides depending on whether the spawn is a man or a woman. Previously, I attempted to make an item_group for each NPC class, specifying the item spawns for men or women depending on the “_male” or “_female” suffixes added to the end of an itemgroup.

Despite this, the NPC spawns barely seemed to work as intended when I did not use an override, the clothing would only partially spawn, and many of the default NPC clothing groups spawned despite my attempt to overrwrite them.

So now I am at a design impasse, I either make two NPC classes for each sex and complicate my mod with what seems to be a stopgap (and the names of each gender are often incorrect), or I create a single series of item groups, but with significant overlap from default NPC spawns.

Is there some way to make NPC item overrides specific to one gender, without having to make a male only or female only class?