OP is essentially asking how to make sense of $$\frac{\partial\hat{A}}{\partial x}\tag{i}$$ in OP's eq. (1), where $\hat{A}$ is a differential operator, in particular if $\hat{A}=\frac{\partial}{\partial x}$. The problem is partly that the notation (i) is ambiguous, cf. e.g. Do derivatives of operators act on the operator itself or are they "added to the tail" of operators? In OP's case, the derivative in (i) does not act further, so we can rewrite (i) via Leibniz rule as a commutator $$ \left[\frac{\partial}{\partial x},\hat{A}\right]\tag{i'}$$ Then OP's eq. (1) turns into a well-known non-commutative Leibniz rule: $$ \left[\frac{\partial}{\partial x},\hat{A}\psi\right]~=~\left[\frac{\partial}{\partial x},\hat{A}\right]\psi+\hat{A}\underbrace{\left[\frac{\partial}{\partial x},\psi\right]}_{=\psi^{\prime}(x)}, \tag{1'}$$ free of notational paradoxes. (Technically, the wavefunction $\psi$$\psi\leftrightarrow \hat{M}_{\psi}$ is here viewed asidentified with a zeroth-order differential operator, i.e. a left multiplication operator $\hat{M}_{\psi}\phi:=\psi\phi$.)