We study a stochastic lattice gas of particles in one dimension with strictly finite-range interactions that respect the fractonlike conservation laws of total charge and dipole moment. As the charge density is varied, the connectivity of the system's charge configurations under the dynamics changes qualitatively. We find two distinct phases: Near half filling the system thermalizes subdiffusively, with almost all configurations belonging to a single dynamically connected sector. As the charge density is tuned away from half filling there is a phase transition to a frozen phase, where locally active finite bubbles cannot exchange particles and the system fails to thermalize. The two phases exemplify what has recently been referred to as weak and strong Hilbert space fragmentation, respectively. We study the static and dynamic scaling properties of this weak-to-strong fragmentation phase transition in a kinetically constrained classical Markov circuit model, obtaining some conjectured exact critical exponents.