You're not the only person who has thought along those lines. I've seen multiple proposals to mass-produce plant alkaloids using microbes (bacteria or yeast). Very few people have the skills required to do this; you have to be an expert in chemistry, as well as molecular biology, and also be patient and good at running experiments and getting funded. And you've probably also have to be lucky in choosing what synthesis to work on.
This falls under the "Synthetic Biology" domain: https://en.wikipedia.org/wiki/Synthetic_biology is a decent introduction to the concepts.
See also the iGEM competition:
https://www.igem.org/Main_Page
the students who work on those projects often come up with really clever ideas and implementations, which has the potential to push the field along faster than if it was just academically funded professors and some startups.