For what it's worth, I tried that second fragment you posted. I found that with the right hand, if I kept everything very relaxed that I could get from the 4 on G to the 1 on G# by moving my whole hand a bit forward and passing my thumb over and in front of the fourth finger. And as it gets faster the thumb doesn't cross much of anything because the hand is moving fast enough to bring it into position without the thumb having to reach for the note.