My, my, my.... how things have changed.....
When I was five years old, sticks were meant for throwing. Just not at people or objects of value. The school I went to bordered a large forested area, and we were always throwing sticks and rocks back into the woods over the fence. One kid used to bring his dog to school at recess (he lived around the corner) and we'd throw sticks for the dog to fetch.
I think you're doing the right thing sitting down with your son and finding out what was happening - from his perspective - that led up to the stick-throwing incident. It helps kids to know that you aren't just punishing them without being interested in the facts. My folks' motto seemed to be "smack first, ask questions later (maybe)"... all that does is create angry kids who feel that they are not being heard.
At the age of five, it's hard to weigh the benefit of a week-long grounding + TV ban + computer ban against an impulsive one time stick throwing incident. That may be a tad harsh, especially if he's usually a really terrific kid as you described. What works quite well for my kids (we started doing this when they were around 10, mind you) is to set a time limit for the grounding (a week, for example) and then allow them an opportunity to earn a reduced sentence so to speak. In your son's case, if he completes the letter of apology and the time-outs at school, you could reduce total time grounded to 5 days instead of a week. Also, make sure the grounding is not punitive to you or your spouse. [The TV and computer stay off when your son is awake and at home - is that workable? Can your family have an alternate activity in lieu of TV and/or computer time?] The term "grounded to the parent" allows for the child to accompany you or mom on an errand. Mr Scully's idea of grounding used to be comparable to "house arrest" - the child couldn't leave the house, except for school - which was a real pain in the butt for me if I had things that I needed to do - it was like I was grounded too. It inevitably caused a lot of strife and of course, it wasn't practical, so it didn't work effectively. Now that you've grounded him for the week, though, you're kind of committed to follow through, but try to keep your options open if something like this happens again.