Recommendations for controlling a twist bone on IK limb

We have implemented IK for our characters hands, it is simple 3 bone IK, from hands up to upper arms. I have twist bones on the upper arms to allow for smoother skinning in extreme poses. These work fine with the baked animation. but when the IK moves the upper arm out of position the twist bone is then incorrect.

Does anyone have any recommendations on how we should control the twist bone in engine? Basically it need to follow the rotation of the main arm bone in 2 axis and rotate 1/2 the distance in the 3rd axis.



I know this is an old post, but this might help give you some ideas.