For me, the first time they don't stop when I call, then they lose the freedom of walking independently – road safety you don't get warnings. For DD1, by three, the consequence was having to walk holding my hand for a bit (rather than choosing to hold my hand, which does also happen!). Then I'd give her another chance to show me she could listen and stay safe. When she was younger, it was using reins or popping her back in the buggy for a bit. Or, on a few memorable occasions, carrying her home under my arm like a sack of potatoes. (DD2 was two in February, and very rarely needs the reins option, but I'm not quite ready to absolutely rely on that yet.)
If they test a second time, that's the end of freedom for that trip – holding hands/reins/buggy until we get where we're going.
That said, I've never had to do it where I couldn't sprint after them if necessary. In your situation, I'd consider insisting he holds hands/uses reins when it's just the two of you until he can show that he can listen and stay safe – explain to him why, and let him have more freedom when there's someone else there to grab him if necessary. It will both keep him safe and show him how seriously you're taking it. Depending on personality, it may help if you frame it as helping mummy whilst she's getting better.
Again, depending on his understanding and personality, playing chasing games in safe circumstances may also help (and talk about where/when it's okay). Most small children do love a game of chase, after all!