This is for zsh. I simply put it into my .aliases file, but your .zshrc file is fine.
function rmdir() { rm -f $1/.DS_Store; command rmdir $1 }
The zsh function given at macosx hints is wayyyyy overkill.
It’s always okay to delete the .DS_Store file so there is no need to do any checking.