Also static friction his a higher coefficient than kinetic friction. That's a physicists fancy way of saying a tire making solid contact with the ground (or payment) has a stronger bite than a tire that is spinning/skidding. (Drag racers know this. Also the concept behind anti-lock brakes). Have some speed, but if possible control the torque so that tire's ground contact is static (i.e. not spinning). The problem is muddy ground can't withstand much torque so this becomes very, very difficult.
Then it becomes a race: Do you run out of momentum, speed, and torque (between tire and ground) before you travel the distance of the mud hole?
adding to. from my own experience. instead of trying a higher gear, to cause the tires to spin...
goto a lower gear. and less throttle and work the split brakes (left and right rear tire brakes). the low gear, less throttle and the just working slowly on the brakes to keep both tires from not spinning.
diff lock is all good and all. but when ya get yourself in a hole the rear tires. one will want to see more force to get it turn while the other one just spins. and the need for one rear tire to barely spin while other tire spins just a little bit more. to bite on through the mud and get you up and out.
if you due end up in a hole and stuck. have found, grabbing a jack and board to place under the jack, lifting each tire up. and tossing some rock under each tire. tends to help the best. granted having rock is the issue many times. trying to place a board under the tires for like a bridge/ramp just eats the rubber off the tires is my experience. and you end up needing to dig the board back out of the mud. some how managed to have approx 5 gallon bucket of rock laying in some bag (bag you get from local hardware stores)
rocking tractor back and forth. has work for me as well. but it is keeping the tires from spinning as you rock back and forth (forward/reverse). if the tires begin to slip just a little bit back off. and go opposite direction. spinning tires just sink you further, at least in my experience. (kinda like turning on a tiller and just dropping it without moving, the tiller begins to sink down)
the rare times i actually let tires spin, is when i am just about out of (rocking) above. and tires are actually grabbing dirt/mud and tossing it behind the tires. vs the mud loading up the tires and loosing momentum and traction. but even then. i try my best to keep the spinning to bare min. and never punch the pedal as far as it will go to spin the tires as fast as they can.
=========
the back lake. the dam on it has a grass/trail going down into the pasture. if the grass is just a bit wet (morning dew), it can be a pain getting up it with a truck. 4WD actually hurts more than helps. has been my experience in different 4WD trucks. due to in 4WD once a tire begins loosing traction that tire will just speed up the RPM's and less power ends up going to the other wheels. and i just come to a stop and end up actually sliding back down. if i put truck/s in 2WD. i tend to "fish tail it" up as a tire slips rear end goes back and forth some. but even then. i am constantly fighting the tires and trying to keep them from spinning in first place. any spinning = lose of traction and reduction in momentum to get me back on top of the hill. after so many loss of traction you just kinda petter out. even though i get so close from getting to the top. most of it for me, is finding the dry spots, and learning how the truck handles. (getting other folks out of the pasture)
while above is not tractors per say. it is that keeping the wheels from spinning thing.