lol. true. In many cases where it "goes wrong". Most of the time, when people "think too far ahead".
In the current context, a more "quick and dirty" thing is intended, which is usually more feasible because this approach looks for advantages "now" instead of "future".
I am estimating that at least for the first part: creating the "registry" by crawling through json files, is actually quite easy. But having no knowledge atm for how stockpile filters work, I cannot comment on what happens after that yet.
I may actually try to do at least the first part if I can gather the motivation later (currently, I don't feel like coding at home as well), if nobody tried it yet, that is. Then perhaps we can see whether it is easier to generate the rest of a mod based on the gathered/organized data.