The problem is not in the algorithm, but in the quality of the reference. …
So, if the reference is of high enough quality, the algorithm can probably reproduce it, to a high degree of accuracy. …
The algorithm is in a sense a form of automated curves adjustment. … The curves are adjusted, by matching the cumulative probability distributions for the red, green, and blue channels.
If the source wasn’t damaged as much as is the Star Wars Blu-ray (crushed, blown, stretched, noised), that would be half-the-battle won. Perhaps a uniform (read “simple”) prep to roughly “straighten the picture” might lessen your need to tweak so much.
I took the Blu-ray picture through 2 passes of JPEG-DNR (1st low, 2nd high) to reduce that awful Lucas-noise™ on everything (no, those aren’t age spots on Tarkin's skin; Luke has them, too) while minimizing edge blurring (multiple “lower” passes do better than one “maximum” pass) . .
and an R-G-B contrast adjustment (to a rough approximation of the reference) while setting an upper & lower headroom for the crushed & blown picture . .
That’s it! Simple settings, quick to do, and now it’s prepped (for your regrade) . .
Actually, the prep-result looks amazingly good, with colors magically coming close to on-the-set reality. (The way it was messed up, the entire Blu-ray should be dealt with this easily.)
And, no, I didn’t cheat. Check out this sequence comparison with a full-size area for close inspection. I included an extra column to show the result if DNR is skipped. SPOILER: the noise gets noticeably worse (!) because normal contrasting, needed to bring the picture back, emphasizes that, too.
Top-row is the Blu-ray; Middle-row is JPEG-DNR; Bottom-row is contrast & headroom adjustment:
I wonder if the full-size prepped picture, run it through your regrade process, would come out looking more (or exactly) like your reference picture of choice?