That’s not the best way to do it, in case you want to downscale a CLUT, because it is equivalent to use the ‘nearest-neighbor’ interpolation to the 3D CLUT cube for downsizing.
Moreover, you cannot easily generate a .png haldclut for a 8x8x8 or a 12x12x12 CLUT.
What you really want is using an averaged interpolation instead (because you want downsizing), which means you want to average neighboring colors in the 3D CLUT when decreasing the resolution.
I don’t know if ImageMagick is able to do that (not sure it does interpolation of 3D images).
With G’MIC, it can be done with something like:
$ gmic input_cube clut12x12x12.cube resize3dx 8 output_cube clut8x8x8.cube