Some files, if you look at them with a Hexadecimal Edit, you will notice that at the beginning of the file there is a sort of "acronym" and this is what the Descriptor and Deficons look for to recognize the file.
I am not a developer but I like to experiment to understand things better, for some files it was easy to find these "acronyms", but there are files that do not have this recognition, and I relied on the Web or by viewing the default values set on Deficons Prefs.
What is very important is that there are no "duplicate" Descriptors, for example AROS by default uses the "Archive" Descriptor, one for all archive formats known to the datatype, this Descriptor will assign the same "def_archive" icon to all archives and therefore should be eliminated if you want a different icon for each file format.
In the scrennshot as an example you can see how a JPG file is recognized by a Hexadecimal Editor, by Dopus4 and by DefIconPrefs.
Once the DefIcons file is recognized it will assign the def_JPG to this file, on AROS the Descriptor will do it instead.
Then maybe I'll send you some of my descriptors so that you can study them, for sure you'll do better than me given your great experience as a developer.