The ratios among the leading-order (LO) hadronic vacuum polarization (HVP) contributions to the anomalous magnetic moments of an electron, muon, and $\ensuremath{\tau}$ lepton, ${a}_{\ensuremath{\ell}=e,\ensuremath{\mu},\ensuremath{\tau}}^{\mathrm{HVP},\mathrm{LO}}$, are computed using lattice $\mathrm{QCD}+\mathrm{QED}$ simulations. The results include the effects at order $\mathcal{O}({\ensuremath{\alpha}}_{em}^{2})$ as well as the electromagnetic and strong isospin-breaking corrections at orders $\mathcal{O}({\ensuremath{\alpha}}_{em}^{3})$ and $\mathcal{O}({\ensuremath{\alpha}}_{em}^{2}({m}_{u}\ensuremath{-}{m}_{d}))$, respectively, where $({m}_{u}\ensuremath{-}{m}_{d})$ is the $u$- and $d$-quark mass difference. We employ the gauge configurations generated by the Extended Twisted Mass Collaboration with ${N}_{f}=2+1+1$ dynamical quarks at three values of the lattice spacing ($a\ensuremath{\simeq}0.062$, 0.082, 0.089 fm) with pion masses in the range $\ensuremath{\simeq}210--450\text{ }\text{ }\mathrm{MeV}$. The calculations are based on the quark-connected contributions to the HVP in the quenched-QED approximation, which neglects the charges of the sea quarks. The quark-disconnected terms are estimated from results available in the literature. We show that in the case of the electron-muon ratio the hadronic uncertainties in the numerator and in the denominator largely cancel out, while in the cases of the electron-$\ensuremath{\tau}$ and muon-$\ensuremath{\tau}$ ratios such a cancellation does not occur. For the electron-muon ratio we get ${R}_{e/\ensuremath{\mu}}\ensuremath{\equiv}({m}_{\ensuremath{\mu}}/{m}_{e}{)}^{2}({a}_{e}^{\mathrm{HVP},\mathrm{LO}}/{a}_{\ensuremath{\mu}}^{\mathrm{HVP},\mathrm{LO}})=1.1456(83)$ with an uncertainty of $\ensuremath{\simeq}0.7%$. Our result, which represents an accurate Standard Model (SM) prediction, agrees very well with the estimate obtained using the results of dispersive analyses of the experimental ${e}^{+}{e}^{\ensuremath{-}}\ensuremath{\rightarrow}$ hadrons data. Instead, it differs by $\ensuremath{\simeq}2.7$ standard deviations from the value expected from present electron and muon ($g\ensuremath{-}2$) experiments after subtraction of the current estimates of the QED, electroweak, hadronic light-by-light and higher-order HVP contributions, namely ${R}_{e/\ensuremath{\mu}}=0.575(213)$. An improvement of the precision of both the experiment and the QED contribution to the electron ($g\ensuremath{-}2$) by a factor of $\ensuremath{\simeq}2$ could be sufficient to reach a tension with our SM value of the ratio ${R}_{e/\ensuremath{\mu}}$ at a significance level of $\ensuremath{\simeq}5$ standard deviations.