Exact solution for the filling-induced thermalization transition in a 1D fracton system