A friend of a friend used to work at NASA on how to pack the Space Shuttle, which is essentially the same problem... except that things need to be taken out in the correct order, through a small hatch, with a robot arm and in zero gravity.
TL;DR: Packing candy is rocket science.