First thing: Dont do direct connections from single rotation axes unless its a local transform. Due to euler flips this is never a good Idea. Instead use matrix information to determine the correct twist value. Or an isolated IK system to track twist separately or something along those lines. Thats way more stable than what you are currently doing. Tho still not perfect as these methos only allow for a -180 + 180 rotation, which isnt a big deal in the end as no single joint in our body can rotate more than that anyway.
PS: the operation of the reverse node is 1-x … not x*-1, keep that in mind.