  The reach of sub-GeV dark-matter detectors is at present severely affected by
low-energy events from various origins. We present the theoretical methods to
compute the single- and few-electron events that arise from secondary radiation
emitted by high-energy particles passing through detector materials and perform
simulations to quantify them at (Skipper) CCD-based experiments, focusing on
the SENSEI data collected in the MINOS cavern at Fermilab. The simulations
account for the generation of secondaries from Cherenkov and luminescent
recombination; photo-absorption, reflection, refraction and thin-film
interference in detector materials; roughness of the interfaces and the
dynamics of charges and partial charge collection (PCC) in the doped
CCD-backside. We consider several systematic uncertainties, notably those
stemming from the backside charge-diffusion modeling, which we estimate with a
"fiducial'' and an "extreme'' model, with the former model presenting better
agreement with PCC data. We find that Cherenkov photons constitute about 40% of
the observed single-electron events for both models; radiative recombination
rates are negligible for the fiducial model, but can dominate over the
Cherenkov rates for the extreme model. We also estimate the fraction of
2-electron events from 1-electron event same-pixel coincidences, finding that
the entire 2-electron rate can be explained by coincidences of radiative events
and spurious charge. Accounting for backgrounds, we project the sensitivity of
future Skipper-CCD-based experiments to different dark-matter models. For
light-mediator models with dark-matter masses of 1, 5, and 10 MeV, we find that
future experiments with 10-kg-year exposures and successful background
mitigation could have a sensitivity that is larger by 9, 3, and 2 orders of
magnitude, respectively, when compared to an experiment without background
improvements. (abridged)
