I once got a M60 tank stuck in dust at Hunter Liggett in CA. Not sand, dry dust so deep it sank up to the hull. Could not pull it out with a dozer. The engineers had to come in and dig a ramp down to firm earth before it could be moved.
The only time I got stuck in mud was in a 4x4 in a farm field. Some planking and ramp building got me unstuck but I still could not drive to where I was trying to get. Most mud holes have a firm bottom and a Locking rear end will push you through, no 4x4 needed. Farm fields can be bottomless though and should be avoided if it has been a wet week.
Being stuck in sand depends on how wet the sand is and how wide the tires are. Dry sand is generally bottomless and spinning will sink you to the differential. At least sand is easy to shovel and comes right off.
Mud sticks to everything and Minnesota farm mud stinks besides.