Uh, finally got it. It's not 'flipping' problem at all, so yes, pole vector manipulation is useless.
The thing is; changing prefered angle after creation of ik chain has no effect since ikHandle picks up skeleton data on creation and sticks with it.
I didn't check joojaa's example but I'd do the following: create two exactly same ik chains ( on same bones ) but prior to creation of each one, adjust the different prefered angle. Group the ik handles together for manipulation. Now use ikBlend attribute to switch between them ( when 0 on first handle, 1 on second and vice versa ).
Of course, you should add nice custom attribute to the group node, for switching between two.