I will outline the way it was derived in the original 1990 paper. We start with an ansatz for the time-dependent wavefunction:
\begin{equation}
\tag{1}
\psi(x_1,\ldots,x_n;t) = \sum_{j_1=1}^{m_1}\cdots \sum_{j_n=1}^{m_n}a_{j_1\cdots j_n}\phi_{j_1}^{(1)}(x_1,t)\cdots \phi_{j_n}^{(n)}(x_n,t),
\end{equation}
with single-particle functions (SPFs) satisfying (the second constraint is to make MCTDH simpler):
\begin{equation}
\tag{2}\label{ortho}
\langle \phi_i^{(k)} | \phi_j^{(k)}\rangle =\delta_{ij} ~,~ \langle \phi_i^{(k)} | \dot\phi_j^{(k)}\rangle =0.
\end{equation}
Now we will use the Dirac-Frenkel variational principle (DFVP) to optimize the parameters:
\begin{equation}
\tag{3}\label{DiracFrenkel}
\langle \delta \psi |(H-\rm{i}\frac{\partial}{\partial t})|\psi\rangle =0.
\end{equation}
Making use of all 4 equations so far, leads to this (you may need some practice with using DFVP):
\begin{equation}
\tag{4}\label{}
\textrm{i}\dot a_{j_1\ldots j_n}=\langle \phi_{j_1}^{(1)}\cdots\phi_{j_n}^{(n)}|H|\psi\rangle .
\end{equation}
If we define the following:
\begin{align}
J &\equiv (j_1,j_2,\ldots ,j_{k-1},j_{k+1},\ldots ,j_n)\tag{5}\\
\mathbf{A}^{(k)} &\equiv a_{j_1\ldots j_{k-1},j,j_{k+1}}^{(k)} \equiv A_{Jj}^{(k)} \tag{6}\\
\mathbf{B}^{(k)} &\equiv \left(\mathbf{A}^{(k)\dagger}\mathbf{A}^{(k)\dagger} \right)^{-1}\mathbf{A}^{(k)\dagger}\tag{7}\\
\hat{H}^{(k)}_{IJ} &\equiv \langle \phi_I^{(k)} |H|\phi_J^{(k)}\rangle \tag{8}\\
\hat{P}^{(k)}&\equiv \sum_{j=1}^{m_k}|\phi_j^{(k)}\rangle\langle \phi_k^{(k)}|\tag{9},
\end{align}
we can instead write:
\begin{equation}
\tag{10}
\textrm{i}|\dot\phi_i^{(k)}\rangle = (1 - \hat{P}^{(k)})\sum_{IJj}B_{iI}^{(k)}\hat{H}_{IJ}^{(k)}A_{Jj}^{(k)}|\phi_j^{(k)}\rangle.
\end{equation}
These are the original working equations for MCTDH, and they are also almost exactly written the way you've written, except with $B$ instead of $\rho$: This is enough to get you started. A full derivation of the working MCTDH equation typically takes more than 60 lines, assuming you already have available some handy DFVP expressions.