The trickier way is randomizing high-end recipes, and even trickier is making that persistent for, say, a week. The former is definitely doable, there's even some abandoned BS12 code for that, the latter I think is doable using the database.
That would, in theory, be interesting, but the problem is that there are so many things you can use that either the secret list has to be so large that there is a high rate of discovery, so that chemists don't get bored, frustrated, or angry, or some sort of in game indicator that you're working with the right set. It could take the form of half-finished research notes, an illicit recipe book under the floor boards, a book in the library, or on notes hidden throughout the different departments.
You're not
entitled to whatever the randomized recipe makes; it's random fun stuff
on top of regular chem balance with random fun effects, for chemists who want to stray from the regular read wiki -> make chems process and just mix random shit for giggles.
If you just have to do a scavenger hunt for the recipe, that's just a very tedious unlock, whereas what makes secret chems interesting is 'wait, what if I add THIS?' - and especially, straying from the standard chem dispenser/derived set of chems.
The major problem I can envision with random recipes is a
conflict of recipes, which is addressed by the largely unused kinetics support (so worst case scenario, you get a mix of two chems with overlapping recipes, depending on the rates) and Goonchem temperature-based reaction requirements, and
container mixes, e.g. some preset fruit/pill/other reagent container's mix of reagents happens to have the same things in it as the recipe is rolled that round and that normally innocent mix turns into something that spawns a singlo or something, which could be fixed by a static requirement, either something like Phoron as catalyst or a specific temperature range.