You can put sandbags in the cabinet, sure. That will work just fine for displacing some volume. Be sure to change your port though too, because when you make the box smaller, the Helmholtz frequency will rise.The JBL 2235 works well in boxes from 2.0ft3 to 6.0ft3 tuned to 30Hz. Four cubic feet is perfectly flat, but so is five, really. I mean, maybe 0.1dB difference, just nothing. The 4.0ft3 box has f3 of 34Hz and the 5.0ft3 f3 is 32Hz. Again, almost no difference.
Now if the cabinet is tuned to 40Hz like you'd want for a 2205, 2225 or 2226, that's different. It will have a 3dB peak at 50Hz. So my point is that I wouldn't go the cubic foot smaller because it just isn't much difference. I might check tuning frequency though, and make sure it's 30Hz.