I use T ' 00 as the proper frame energy density of the gass and r0c2 as the proper frame energy density of the box material itself, and S' to indicate the proper frame.
The proper frame stress-energy tensor of the photon gass is
The proper frame stress energy tensor for two of the walls whose surface normal is (anti)parallel the direction of motion has stresses in the wall both from being pushed on by the gass pressure normally and from being stretched from the edge attachments to the other walls that are also being pushed on by the gass. The average x-x component of the stress energy tensor for these two walls would be proportional to the gass pressure on them. i.e.
T ' xx = e T ' xx/3
Assuming a material for which e~1 the proper frame stress-energy tensor consistent with this for those two walls will be
The proper frame stress energy tensor for two of the four of the walls whose surface normal is perpendicular the direction of motion is
The proper frame stress energy tensor for the other two of the four of the walls whose surface normal is perpendicular the direction of motion is
I'll use L W and H for the "inner lengths". The center of momentum frame energy is
Ecm = gassEcm + boxEcm = LWHT ' 00 + mboxc2
The Lorentz transforms of the box result in:
From the first,
0
E = LWHgT ' 00 (1 + b 2/3)From the second (neglecting edges from here out)
1
E + 2E = 2daWHg (r0 + T ' 00b2/3)From the third
3
E + 4E= 2daLHg [r0 - (1/4)(W/da + 2W/L)T ' 00b 2/3]From the fourth
5
E + 6E = 2daLWg [r0 - (1/4)(H/da + 2H/L)T ' 00b 2/3]Adding the contributions up results in
E = LWHgT ' 00 + 2daWHgr0 + 2daLHgr0 + 2daLWgr0
E = g(LWHT ' 00 + mboxc2)
E = gEcm
QED