Photonic topological boundary pumping as a probe of 4D quantum Hall physics