I remember the following result that many years ago I was able to show that the following claim is valid:
Let $X$ be some Hilbert space with norm denoted by $\left\|\;\!\cdot\;\!\right\|_{X}$. Let the operators $A:{D}\left(A\right)\rightarrow X$ and $B:X\rightarrow X$, where $B$ is compact, possibly of finite rank, and $A$ is boundedly invertible, but, by definition, not defined on the whole of the underlying space. Then $BA$ is compact if and only it is bounded in the sense that, for all $x\in{D}\left(A\right)$, \begin{equation} \left\|BAx\right\|_{X}\leq c\left\|x\right\|_{X} \end{equation} for some real number $c$.
I cannot reproduce the proof, so I am not even sure anymore if the claim is entirely true. The result played a role in analysing the spectral properties of ordinary differential operators.