I'm sure there are many ways to optimize a palette, but here's a partial attempt to guestimate what the intended palette balance would be and attempt at unifying/optimizing it a tad, it's only partially done, stopped to see if it is even remotely close to what should be done?
using perceptual contrast and greyscale value-luminance averages to make the contrast stepping consistent. and some real quick suggestions on possible colours to fill out the 32 slots

remarkably I actually did a palette not too long ago using base increments to decrease the colour choice to 4bit per channel(if i recall, could've been 2 bit, I can only remember it involved breaking the 0-255~256 choice down into steps of say 8 or 16, I took ages coming up with my own reference sheet and creating the resulting palettes for each bit range and colour ranges (only really low bit ranges, upto 8bit i think), but it died with my old PC) and then made my own palette and tweaked it a bit after choosing those, and when I discovered Arne's palette awhile ago it was incredibly similar to what I had done, but mine was a tone or two darker and tinted slightly differently but the core range was the same found it quite interesting

guess he had a similar logical approach? although i might add I was consciously influenced by text I read somewhere on how they chose palettes for old palette restricted consoles and PCs, maybe he was too?
