I realised after reading this that I'd kind of been doing the channel restriction thing already just cause it was satisfying to me, the colours felt more pure or something. It hadn't occurred to me that it had any basis in history. Having been told that I ran with it on my newest piece and I think the colours turned out really nice. Of course I went with 5 values per channel which makes no sense in terms of bits but it came up with a really interesting palette. Does anyone smarter than me know of a way to generate the whole palette with those restrictions?
In Gimp, you can generate RGB colorcubes using 3 layers, a bit of pencil tool work, a bit of scaling, the filters->Map->Tile filter (or copy/paste), and Colors->Components->Compose filter. Just keep in mind that the image must be Grayscale, not RGB, for the Compose filter to be available.
These are the three grayscale layers I made, they each represent a channel -- order doesn't matter but I like having green going across, red going down and blue as z (dunno what else to call it -- the slowest-changing dimension), so that is how I've labelled them here:
R:

G:

B:

(given the above layers, all you'd need to do was chuck them in a Greyscale image and feed them to Colors->Components->Compose. The other comments described how I created the above layers. Hopefully the structure of the layers is obvious.)
These images are 5x25, or more generally Ax(BxC). Which dimension is which doesn't matter, 25x5 would be equally doable.
If you want values you can use in code, it would be pretty easy in python, just use
import itertools
alltriples = itertools.product(rintensities, gintensities, bintensities)
.
for example for your 5x5x5 cube you can use the values you mentioned:
import itertools
intensities = [0, 0x3f, 0x7f, 0xbf, 0xff]
alltriples = itertools.product(intensities, intensities, intensities)
Both methods are easily adapted to arbitrary intensity levels or different number of intensities for different channels.
Though of course as Ptoing has mentioned, GrafX2 or ProMotion are probably more convenient than generating a palette, since they explicitly force all colors to conform to the selected colorcube at all times.
The 5x5x5 palette doesn't seem to be used historically. OTOH, the Amstrad CPC palette was 3x3x3, and 5x5x5 is a direct expansion of it (keeping three levels exactly as is, adding two exactly intermediate ones). So I mentally labelled this colorcube 'CPC5'.