Sorry, if you using release-cesm2.2.2, then you shouldn't have to make any changes to the code.
You should just be able to set the following in your user_nl_cpl in your case directory (which I assume is either an F-case or a B-case) to generate the coupler history files:
histaux_l2x1yrg = .true.
histaux_a2x24hr = .true.
histaux_a2x3hr = .true.
histaux_a2x1hri= .true.
histaux_a2x1hr = .true.
histaux_r2x = .true.
I should note though that the coupler history files that are generated can only be used by CTSM tags near ctsm5.1.dev061 or earlier. After that tag, the driver changes from mct to nuopc and the coupler history file configuration also changes.