So, to summarize all the factors:
1.) Balance front to back
2.) Smooth pedal stroke, (jerky mashing will cause slip) Plug gear selection into this one.
3.) Tire pressure
4.) Tire tread
I have found that an oval chainring helps with #2 for climbing, but that may be a bit of a crutch vs better form.
Sounds like the OP has the awareness to figure this out with just a bit more trial and error/practice.
I'm only chiming in because it was quite muddy today and I was struggling, even on my fatbike. No, I didn't stall, but the experience is fresh in my mind:
1) Balance - it was constantly changing. I noticed that I unweighted the rear a little too much when crossing a few mud holes, causing me to reduce traction. I have enough experience to quickly adjust and prevent tire spin.
2) Smooth pedal. I think I have pretty good pedal skills; smooth power, even around the top and bottom of the stroke. Additionally, if you do slip a tire in the midst of your smooth pedal stroke, it doesn't upset your balance. You can correct without putting a foot down, and even maintain forward motion as your bike slips and slides left/right (you can't do this very well seated).
3) 5-8psi.
4) Specialized FastTrak 4.0. It is a low-tread Summer tire, not suited for mud, so I had to work it.
5) Seek traction. Learn to read the trail. Rocks, roots, and soils of different types run the gamut of traction/no traction depending on ...everything. Sometimes those puddles persist because the bottom of the puddle is rock (good traction) - sometimes it's slick clay. I strongly discourage widening of the trail in one's search for traction, which I observed a LOT of today.
Good luck!
-F