I think this task does not lend itself to automation well, creating the gradient Map manually seems preferable to me.
Moreover the luminance and contrast of the target image may make manual corrections necessary.
Have you checked out the Color Lookup Adjustment yet?