A similar thing happened to one of my children, many years ago when she was also 4. She was given a creme egg in the home queue and told not to eat it. I need to add that she was an impeccably behaved child until now and the school would have known this.
She couldn't contain herself and bit some of the top. The teacher saw and snatched the egg from her and threw it into the bin, leaving her crying. Luckily for me, the assistant saw and immediately came to her rescue, cuddling her and offering quiet reassurance. I know because my child told me, not the assistant.
I was really, really angry. I see exactly what everyones saying about 4 year olds following instructions etc, but she was just so well behaved normally. The school always remarked to me how she was kind to the others and always tried to befriend children alone in the playground etc. I am a pretty strict parent and don't tolerate disobedience and so I see how what I'm saying looks contradictory, but I really think this was spiteful. I know rules are rules and my (mostly) well behaved children have lost out many times to children who disobey but don't get punished - in this case though, the others wouldn't have lost out, they'd just get to eat their smartie later on.
For her to disobey, it really must have been either irresistible or she didn't hear the instruction, which she claims she didn't (who knows? When I spoke to the assistant later, she conceded that it was possible that all the children hadn't heard, but she also was shocked at the violence of the snatching of the egg - maybe it was unprofessional but she did actually put a complaint in about it). Either way, I don't agree that teachers of such young children should put them in this position (for eg, put the eggs in their book bags, or don't give the smarties out until they're required).
It's nursery, not prison. To make a little boy make his biscuit and then not let him have it seems nothing other than spiteful. Added to this, it sounds like there was confusion over the smarties anyway.
I wouldn't be able to send my child back to a place that punished a child so out of proportion. Biscuit making is supposed to be fun - nursery is supposed to be fun. Discipline has to be maintained but it's not the army.
I would have said, "Ah you've eaten your smartie already - now your biscuit won't be so pretty!" but in a gentle voice. He'd see the consequence of his action but without having his soul crushed.
If you were making cookies at home, would you allow him to eat them? I suspect you would, and if you didn't and he sneaked one, would you actually make him help you make them and then deny him one afterwards? Because I would consider that a bit weird.
Your poor son, I wish I didn't know about this, it's making me feel so sad.