Let $f(x)$ be a function such that $f'(x) = f(x)g(x)$. Is there a general way to express the $n^{th}$ derivative of $f(x)$ such that $$ f^{(n)}(x) = f(x)h(x), $$ where $h(x)$ is a function of the derivatives of $g(x)$? For example:
\begin{align} f''(x) = [f'(x)]' &= [f(x)g(x)]' \\ &= f'(x)g(x) + f(x)g'(x) \\ &= f(x)[\{g(x)\}^2 + g'(x)] \end{align} and so $h(x) = \{g(x)\}^2 + g'(x)$.
I think that using the general Leibniz rule might help, but I cannot quite get the recursion.
Suppose $f$ is such that $f' = gf.$
We start by proving by induction that there for all $n \in \mathbb N$ there exists $h_n$ such that
$$ f^{(n)} = f h_{n}$$
We therefore have the recursive formula
\begin{cases} h_{n+1} = gh_n+h_n' \\ h_0 = g \end{cases}
If you try to use this formula you will find that the derivative appearing in it is annoying so we will try to remove it.
By Leibnitz rule \begin{align*} f^{(n+1)} &= (gf)^{(n)} \\ & = \sum_{k=0}^n {n \choose k} g{^{(n-k)}}f^{(k)} \\ &= \sum_{k = 0}^n {n \choose k} g{^{(n-k)}} (fh_k) \\ &= f \times \sum_{k = 0}^n {n \choose k} g{^{(n-k)}}h_k \end{align*}
It follows that we have
$$ f \times h_{n+1} = f \times \sum_{k = 0}^n {n \choose k} g{^{(n-k)}}h_k.$$
Hence $$h_{n+1} = \sum_{k = 0}^n {n \choose k} g{^{(n-k)}}h_k$$ whenever you are not at a root of $f$. As per the comments $f= Ae^G$ where $G$ is a primitive of $g$ so $f>0$ or $f<0$ whenever $A \neq 0$ so you have the recursion formula
\begin{cases} h_{n+1} = \sum_{k = 0}^n {n \choose k} g{^{(n-k)}}h_k \\ h_0 = g \end{cases}