Does anyone think the giving them away (to charity) as a punishment teaches children that giving to charity is bad?
I'm not a fan of getting rid of any toys as a punishment, but am a fan of teaching the child to freely give them away and getting a rewarding feeling from doing so.
It totally depends on how your phrase it and the temperament of the child.
Some children will be absolutely devastated by the loss of the tiniest piece of junk. Most, in my experience, really won't care much if you donate a toy they left sitting around. It's pretty easy to treat it as a game, a fun thing to do, a contest to see who can find the most old toys to donate, etc.
Like RootofGood said, you will very quickly become absolutely overwhelmed with stuff unless either 1. You have no family who gives material gifts, or 2. You manage to become one of those very few parents who is able to divert the gifts.
Number 2 Is difficult because it is constant and unrelenting, and often leads to hurt feelings. Very few parents manage to do it. It seems to break down to something like 85% have houses that look like a bomb went off, 14% declutter after the gifts come in, and 1% manage to stop them from coming in in the first place.
The declutter group is where I belong. When they are babies and toddlers, you just do it. As they get older you teach them the joy of minimalism and donating to charity. Once they understand that, you remind them that they can either put their crap away, or you can find it a home with someone who will take care of it.