Why does the size reduce to $6 \times 6$ in the capsule networks?
After the first Conv layer, the size reduced to 20x20
for the primary caps which is convolutional caps layer
n final = (n + 2p -f )/s + 1
which gives a 6x6 output with 256 channels

6x6x256 is further encoded into capsules of 8 dimensions by reshaping the channels 
i.e. 256/8 = 32
which gives 6x6x32 = 1152 capsules

try experimenting with the same hyperparameters first and then try to encode higher-level features by making suitable changes to the hyperparameters.