The whole point of punishment is to get the child to contemplate why a behavior or choice was wrong, to consider alternatives to that course of action, and commit to making better choices in the future.
Do you think your son understands why his choice was so risky? Do you think he'd make a more sensible choice next time (such as to wait for you to come back?) If the answers are yes, then no punishment is necessary. This situation is not too likely to happen again, and he is probably properly impressed by how dangerous that mud can be.
If you're not sure that he's gotten it, then how about having him write you a letter in which he can explain what he does understand? That will help clarify whether he needs more explanation/clarification, or whether you can trust that he understands your need for him to follow your instructions.
Requests about punishment often remind me of a time my little sister, about age 5, got lost shortly after we moved to a neighborhood with tangled, winding streets. After hours of panicked searching and getting the police involved, she was found wandering a few blocks away. My mom held it together until the nice policeman left, then lit into my sister in total fury, screaming and slapping. What she was probably feeling was both relief and the strain of the last few hours, but my little sister had been just as frightened. And she was completely baffled and heartbroken at this "welcome" home.
Where did the fault sit? Hard to say. My sister never again made whatever navigational mistake that got her lost that time, but she probably wouldn't have even if my mother had only kissed her and wept with joy. The punishment she received was a puzzlement to me then, and still is today, possibly because my mom relied way too heavily on the value of punishment to teach her children, and from my viewpoint, it was seldom necessary. A calm talk would have worked better.