How do you specify the current of interest, based on such a distorted signal?
Provided that the other frequencies have a low amplitude only, you could filter the signal in hardware or software, then take the peak value and compute the RMS value from it.
Next you need some circuit to provide the right current to the secondary controller. Using PWM may distort the primary current further, so that a linear current source can be required.