My 4.5yo grandson sounds much like your son, sweet, well-behaved, and surprisingly honest. I think the honesty comes in part because he does get appreciation for it, and consequences are saved for repeated infractions.
Put yourself in your son's shoes: taking away the ice cream would have seemed arbitrary and unfair, because it would have been a new "rule" imposed AFTER he had had his few moments of childish joy. And who's to say the cousin didn't participate by letting go of his hand because she wanted her own hand free for a moment? If you had warned him beforehand that he could lose his ice cream by letting go, that would be a different situation.
With my grandson and kids I work with in my religious community, I'm using the thoughtful techniques outlined in How to Talk So Kids Will Listen, and Listen So Kids Will Talk. (http://www.amazon.com/How-Talk-Kids-Will-Listen/dp/038081...)
The authors demonstrate how to help children communicate, think through and participate in finding workable solutions to every possible situation. This approach helps them gradually learn to act from their own internalized wisdom and authority, which is a wonderful thing as they become more independent.
I love this process, and am frequently charmed and delighted by the original, and appropriate, solutions my grandson finds. He's also far more likely to remember a situation and apply it in the future. If he were to tell me that he had let go and run around for a minute, I would have looked him in the face and asked, "Will you tell me why I wanted you to hold hands the entire time?"
I'll bet he would have given me much of the lecture you gave your son. And then he would have explained to me that he had taken my worries into account, and how he had made sure he was safe.