Punishment? I didn't say a word about punishment. I wouldn't spank a child or punish her in any other way because she broke a toy -- especially since it was an accident. I especially wouldn't yell at her or belittle her in any way.
I try to approach things from the "natural consequences" standpoint. The toy is broken -- there's no guilt or blame -- it's just a fact. However, it costs money to replace it. Having the child do some chores to replace the item helps her understand the way the world works. I'm not sure I'd tell a five-year old that it ended up being replaced for free; I wonder if it would confuse her about other things being replaced for free in the future. I'm iffy on that little wrinkle. We all experience natural consequences in our lives: If I wreck my car today, it's going to take some effort and money to fix it -- even if it's not my fault.
Other natural consequences:
You wet the bed last night, so we need to work together to put the sheets into the washer.
The soda is spilled on the floor, so we'll have water with our dinner tonight.
The toys aren't picked up yet, so we can't go outside to play until it's done.
Natural consequences are an important life lesson, and children who grasp the concept early in life avoid pain down the road. It should never be confused with punishment.