Context. Time-delay cosmography is a technique for measuring H0 with strong gravitational lensing. It requires a correction for line-of-sight perturbations, and thus it is necessary to build tools to assess populations of these lines of sight efficiently. Aims. We demonstrate the techniques necessary to analyze line-of-sight effects at a population level, and investigate whether strong lenses fall in preferably overdense environments. Methods. We analyzed a set of 25 galaxy-galaxy lens lines of sight in the Strong Lensing Legacy Survey sample using standard techniques, then performed a hierarchical analysis to constrain the population-level parameters. We introduce a new statistical model for these posteriors that may provide insight into the underlying physics of the system. Reults. We find the median value of κext in the population model to be 0.033 ± 0.010. The median value of κext for the individual lens posteriors is 0.008 ± 0.015. Both approaches demostrate that our systems are drawn from an overdense sample. The different results from these two approaches show the importance of population models that do not multiply the effect of our priors.