We present the complete next-to-next-to-leading order (NNLO) pure pointlike QED corrections to lepton-proton scattering, including three-photon-exchange contributions, and investigate their impact in the case of the MUSE experiment. These corrections are computed with no approximation regarding the energy of the emitted photons and taking into account lepton-mass effects. We contrast the NNLO QED corrections to known next-to-leading order corrections, where we include the elastic two-photon exchange (TPE) through a simple hadronic model calculation with a dipole ansatz for the proton electromagnetic form factors. We show that, in the low-momentum-transfer region accessed by the MUSE experiment, the improvement due to more sophisticated treatments of the TPE, including inelastic TPE, is of similar if not smaller size than some of the NNLO QED corrections. Hence, the latter have to be included in a precision determination of the low-energy proton structure from scattering data, in particular for electron-proton scattering. For muon-proton scattering, the NNLO QED corrections are considerably smaller.