... Perhaps we could expose the magic numbers in each gradient function and then apply a genetic algorithm to straighten the curve while keeping the result as close as possible to the original gradient (how to quantify the difference, though?).
You might be interested in the method that was used to create Cividis:
https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0199239
... which also immediately highlights that this perceptual uniformity is highly dependent on the observer. It's always going to be a trade-off of compromises
In terms of colors it's clear that there's not one true truth. But it could be fun to design a way to rescale/warp a color interpolator (https://observablehq.com/d/f10b45253c5d3f62), and make some colors schemes "better" in that narrow sense. The idea would be to compress the regions where the scale changes too slowly. I wouldn't apply this to the finely tuned (researched, peer-reviewed, published) color scales tested here, but it might be useful on some random user-supplied scales, or colors extracted from image data etc.