Adding the cubes to BranchGroups and dynamically updating them or managing multiple groups sounds complicated.
Perhaps consider keeping the cubes independent. Create three transforms: one to rotate clockwise/counter-clockwise 90 degrees about each of the three axes. To rotate a face, apply the same transform to each of the cubes in that face -- since they are all rotating about the same axis anyways.