My wife's 2006 4.2 9-7x was doing this sort of thing from time-to-time.
I found the ABS sensor on the drivers side wheel full of rusty water. After I replaced both front hubs the problem went away.
Note: the front ABS sensor needs a five sided Allen wrench to remove the retaining bolt. I could not find such a thing, but the internet wisdom came though and people suggested a five-point Torx bit: It fits, you need to tap it in, and it removed the retaining bolt. I don't recall which size five point Torx was needed, but I got a set that covered it for about $10 on Amazon.
The front bearing hubs came with an ABS sensor pre-installed along with the correct long cable and all mounting plastic inset/clip thingies.