@CarVac and I currently are working on a library (librtprocess) which aimes to include some of the RawTherapee processing steps.
Today I started work to include raw ca correction from RT into librtprocess and use that in hdrmerge.
I still have to solve some issues, but it turned out to work really well. Soon, hdrmerge will be able to use raw auto ca correction!