If we start in the gauge
\begin{align*} \textbf{E}=-\nabla\phi-\frac{\partial\textbf{A}}{\partial t}, \end{align*}
\begin{align*} \textbf{B}=\nabla\times\textbf{A} \end{align*}
We can express everything in terms of the vector potential by performing the gauge transformation
\begin{align*} \textbf{A}\rightarrow\textbf{A}'=\textbf{A}+\nabla\chi \end{align*} \begin{align*} \phi\rightarrow\phi'=\phi-\frac{\partial\chi}{\partial t} \end{align*}
Where $\nabla\phi=\nabla\partial_{t}\chi$, then we have a gauge where both the electric and magnetic fields are expressed solely in terms of vector potential:
\begin{align*} \textbf{E}=-\frac{\partial\textbf{A}'}{\partial t}, \end{align*}
\begin{align*} \textbf{B}=\nabla\times\textbf{A}' \end{align*}
Often, in textbooks on quantum optics, I see them start with this definition for both fields before choosing the Coulomb gauge. To transform to the Coulomb gauge we require $\nabla\cdot\textbf{A}=0$. Thus repeating the gauge transformation to enforce this
\begin{align*} \textbf{A}'\rightarrow\textbf{A}''&=\textbf{A}'+\nabla\chi'\\ &=\textbf{A}+\nabla\chi+\nabla\chi' \end{align*}
\begin{align*} \phi'\rightarrow\phi''&=\phi'-\frac{\partial\chi'}{\partial t}\\ &=\phi-\frac{\partial\chi}{\partial t}-\frac{\partial\chi'}{\partial t} \end{align*}
As long as
\begin{align*} \nabla^{2}\chi'=-\nabla\cdot\textbf{A}' \end{align*}
we're in the Coulomb gauge. However is it possible to do this without changing the value of $\nabla\phi$? Intuitively, if
\begin{align*} \nabla\frac{\partial\chi'}{\partial t}=0 \end{align*}
then it's fine, but that implies that $\nabla^{2}\chi'$ has no time dependence, and therefore that $\nabla\cdot\textbf{A}'$ has no time dependence. Feels like theres a loss of generality in doing this, for instance if the fields are functions of time. So my question is, is it okay to take both these gauges in conjunction for a completely general pair of electric and magnetic fields? And if not, what conditions is this okay in?