  Evidence is growing that a second dome of high-$T_\mathrm{c}$
superconductivity can be accessed in the cuprates by increasing the doping
beyond the first dome. Here we use \emph{ab initio} methods without invoking
any free parameters, such as the Hubbard $U$, to reveal that pressure could
turn YBa$_2$Cu$_3$O$_7$ into an ideal candidate for
second-dome-superconductivity, displaying the predicted signature of strongly
hybridized $d_{x^2-y^2}$ and $d_{z^2}$ orbitals. Notably, pressure is found to
induce a phase transition replacing the antiferromagnetic phases with an
orbitally-degenerate $d$--$d$ phase. Our study suggests that the origin of the
second dome is correlated with the oxygen-hole fraction in the CuO$_2$ planes
and the collapse of the pseudogap phase.
