There is an app that let's you scan a barcode and retrieve the ingredients, if Trump hasn't already shut it down. I believe it was an FDA project. If you had another DB correlating ingredients with the various characteristics you're looking for, it should be relatively simple to perform relative queries to arrive at the data set you want.
Discussion
No need for databases. You should be able to scan the ingredient text and just see the results
That data still needs to live somewhere. If not a relational database, than something like redis.
No. Not really. You can just ask a model to identify shit ingredients. You could even customize what you want to avoid or have more of
The FDA is a criminal organization and yes it will be shit down by our hero Trump.