Context: The number of known strong gravitational lenses is expected to grow substantially in the next few years. The statistical combination of large samples of lenses has the potential of providing strong constraints on the inner structure of galaxies. Aims: We investigate to what extent we can calibrate stellar mass measurements and constrain the average dark matter density profile of galaxies by statistically combining strong lensing data from thousands of lenses. Methods: We generate mock samples of axisymmetric lenses. We assume that, for each lens, we have measurements of two image positions of a strongly lensed background source, as well as magnification information from full surface brightness modelling, and a stellar population synthesis-based estimate of the lens stellar mass. We then fit models describing the distribution of the stellar population synthesis mismatch parameter $alpha_{sps}$ (the ratio between the true stellar mass and the stellar population synthesis-based estimate) and dark matter density profile of the population of lenses to an ensemble of 1000 mock lenses. Results: The average $alpha_{sps}$, projected dark matter mass and dark matter density slope can be obtained with great precision and accuracy, compared with current constraints. A flexible model and the knowledge of the lens detection efficiency as a function of image configuration are required in order to avoid a biased inference. Conclusions: Statistical strong lensing inferences from upcoming surveys have the potential to calibrate stellar mass measurements and to constrain the inner dark matter density profile of massive galaxies.