The animation was unsatisfactory and I think the punch line is going to give me nightmares (excuse the pun) forever.
I think next time you should try to focus more on the animation and make the entire joke feel more strung together. It felt too much like a non sequitur, considering how it jumped from Derpy to Rarity to Spike. In addition, vulgarity =/= humour, so try to focus more on actual funny than just freaking people out with a masturbating dragon - if he's masturbating, there better be a really damn good reason why, just with any other action he's doing.