If I understand correctly the volume values are powers of 3...
I've found a way to fill completely a fewer number of boxes. My motive is to consider at each stage the largest power of 3, subtract it, and then do the same with the remainder.
So, ; ; . Therefore boxes are enough.
The goal, I believe, is to subtract large number as possible in order to keep to the number of boxes low.
I think that this is similiar to what you did.