  Electron-phonon superconductors at high pressures have displayed the highest
values of critical superconducting temperature $T_c$ on record, now rapidly
approaching room temperature. Despite the importance of high-$P$
superconductivity in the quest for room-temperature superconductors, a
mechanistic understanding of the effect of pressure and its complex interplay
with phonon anharmonicity and superconductivity is missing, as numerical
simulations can only bring system-specific details clouding out key players
controlling the physics. Here we develop a minimal model of electron-phonon
superconductivity under an applied pressure which takes into account the
anharmonic decoherence of the optical phonons. We find that $T_c$ behaves
non-monotonically as a function of the ratio $\Gamma/\omega_0$, where $\Gamma$
is the optical phonon damping and $\omega_0$ the optical phonon energy at zero
pressure and momentum. Optimal pairing occurs for a critical ratio
$\Gamma/\omega_0$ when the phonons are on the verge of decoherence
("diffuson-like" limit). Our framework gives insights into recent experimental
observations of $T_c$ as a function of pressure in the complex BCS material
TlInTe$_2$.
