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 highenergy particles as they pass through detector materials and perform a detailed simulation to quantify them at (Skipper) CCD-based experiments, focusing on the SENSEI data collected at Fermilab near the MINOS cavern. The simulations account for the generation of secondaries from Cherenkov and luminescent recombination radiation; photo-absorption in the bulk, backside layer, pitch adapter, and epoxy; the photon reflection and refraction at interfaces; thin-film interference; the roughness of the interfaces; the dynamics of charges produced in the highly doped CCD-backside-layers; and the partial charge collection on the CCD backside. We consider several systematic uncertainties, notably those stemming from the backside modeling, which we estimate with a "fiducial" and an "extreme" charge-diffusion model, with the former model being preferred due to better agreement with partial-charge collection data. We find that Cherenkov photons constitute about 40% of the observed single-electron events for both diffusion models; radiative recombination contributes negligibly to the event rate for the fiducial model, although it can dominate over Cherenkov for the extreme model. We also estimate the fraction of 2-electron events that arise from 1-electron event coincidences in the same pixel, finding that the entire 2-electron rate can be explained by coincidences of radiative events and spurious charge. Accounting for both radiative and non-radiative 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.