Basically, the flipping can be avoided if we stay out of rotational constraints or connections. I am going to show two methods on how this can be achieved.
1st Method (Aim Constraint with Up Vector) : The first method deals with setting up a joint twist using the power of aim constraint. The twisting of each joint is controlled by World Up Objects, which are basically locators re-positioned on top of each joint. Once the locators are moved, the joint twist evenly without any flipping. Check out the images below for detail!
2nd Method (Spline IK with Up Vector) : The second method is pretty straight forward. Create a regular spline IK on a given joint chain. From the advance twist option, make sure that World Up Type is object Up (Start/End). Just like the aim constraint, the up locators are used to setup the advance twist for the entire joint chain. Again, check out the images below for detail!
Therefore, both of the method shown above can be applied for creating a non - flipping GIMBAL LOCK friendly twist setup which can be applied for regular forearm twist or whatever. Spline IK Advance Twist doesn't seem to work very well with mirrored joint, in such case just re-root the mirrored joint chain so that the end joint becomes the parent (Maya Bug). I hope this post could be useful to you, let me know if you have any concerns. Cheers :)
P.S. here is another cool alternative for no flipping twist by Cedric Bazillou. He used a custom Quaternion based Aim Constraint node to achieve the result. More info can be gathered from his blog!
Yet another cool post by Keil Figgins "Forearm Twist: An Animation Solution". Good read!