I know that zero is a finite number, but since the photon is a massless particle, wouldn't it be impossible to get a kilogram worth of photons bouncing around in an optical cavity?
No, it’s entirely possible in principle. If you build a perfect optical cavity, weigh it, pump a bunch of light in, and weigh it again, you’ll find that the weight went up by ghf/c^2 summed over each photon added to the cavity. Divide by g and you get the sum of the masses of the photons. 1 kg of photons would be enough to destroy your lab and the rest of your city, so only a very advanced civilization would ever do the experiment on this scale.
Photons indeed have no rest mass, but it’s impossible to ever find a photon at rest unless you yourself have no rest mass, in which case you also have no ability to do experiments.