  Motivated by the observation of superconductivity in SrTiO$_3$ and Bi, we
analyze phonon-mediated superconductivity in three-dimensional systems at low
carrier density, when the chemical potential $\mu$ (equal to Fermi energy at
$T=0$) is comparable to or even smaller than the characteristic phonon
frequency $\omega_L$. We consider the attractive part of the Bardeen-Pines
pairing interaction, in which the frequency-dependent electron-phonon
interaction is dressed by the Coulomb potential. This dressing endows the
pairing interaction with momentum dependence. We argue that the conventional
Migdal-Eliashberg (ME) approximation becomes invalid when $\mu \leq \omega_L$
chiefly because the dominant contribution to pairing comes from electronic
states away from the Fermi surface. We obtain the pairing onset temperature,
which is equal to $T_c$ in the absence of phase fluctuations, as a function of
$\mu/\omega_L$. We find both analytically and numerically that $T_c$ increases
as the ratio $\mu/\omega_L$ becomes smaller. In particular, in the dilute
regime, $\mu \rightarrow 0$, it holds that
$T_c\propto\omega_L\left(\frac{Ry}{\omega_L}\right)^\eta$, where $\text{Ry}$ is
the Rydberg constant and $\eta \sim 0.2$.
