Well, I think it works:
https://github.com/soupday/cc3_unity_scripts/blob/main/Editor/TwistRigCorrection.cs(Requires the Animation Rigging package.)
Put it in an folder called 'Editor'. It adds two menus
CC3->
Rigging->
Add Twist Rig and
Remove Twist Rig. (Use with the character selected in the scene.)

It can be quite a subtle effect, it's difficult to tell if I've done it right.
Also note, I could not get more than one axis to operate on a single twist bone, so I just went with the X axis for the knee and elbow share bones.
It probably also won't work on older pre CC3 character generations as they have some different bone names.