Add a Subcategory in Detail Item Family

If you google “revit dynamo add parameters to families” you can get some interesting results (even if their goal is a bit different).
Right now I can’t write a graph but this might help:

I think you can edit the families in the project, but for testing purposes I would first save all the failies to a directory (save as/library/families), then in a dynamo graph input a directory, get all the content (OOTB nodes I think, or DanEdu, now Orchid), open the docuents in background (rhythm nodes i think), run my python script (connected to the open.Document node), then close and save the file to your folder.

There surely is a way to do it directly from the project but I still have to try it. I did something similar in this thread but I should edit the code a bit to make it work in your case