Detail recovery algorithm
So, I played around with some basic ideas here and got a result that didn't look half-bad (IMHO). A proper solution here will require a dedicated preprocessing pass into a luma detail texture which we can then aggressively blur/downscale and use to form a highpass of the input image.