Appropriate versus inappropriate is irrelevant, in my opinion. Can it work? Yes. Is it more likely to backfire and make your team miserable? Yes. Is it something that creates a hostile work environment? Debatable, and definitely situational.
I would actually argue that when done right, this sort of smack-talk can be healthy and reassuring to the recipient. It's a bit perverse, but I like a situation where my coworkers respect me enough to make fun of my mistakes without me or them worrying that it actually calls my competence into question. I've worked with people who you can't poke fun at, and it's usually because they actually are somewhat incompetent and making fun of their errors would be cruel.