Humans have a unique capacity to innovate, transmit and rely on complex, cumulative culture for survival. While an important body of work has attempted to explore the role of changes in the size and interconnectedness of populations in determining the persistence, diversity and complexity of material culture, results have achieved limited success in explaining the emergence and spatial distribution of cumulative culture over our evolutionary trajectory. Here, we develop a spatio-temporally explicit agent-based model to explore the role of environmentally driven changes in the population dynamics of hunter-gatherer communities in allowing the development, transmission and accumulation of complex culture. By modelling separately demography- and mobility-driven changes in interaction networks, we can assess the extent to which cultural change is driven by different types of population dynamics. We create and validate our model using empirical data from Central Africa spanning 120 000 years. We find that populations would have been able to maintain diverse and elaborate cultural repertoires despite abrupt environmental changes and demographic collapses by preventing isolation through mobility. However, we also reveal that the function of cultural features was also an essential determinant of the effects of environmental or demographic changes on their dynamics. Our work can therefore offer important insights into the role of a foraging lifestyle on the evolution of cumulative culture.