How far can one go with Purim Torah? Can one descend into heresy, so long as it is known that one is not serious?
I don't know about heresy per se. But since Pirkei Avos (4:12) says that "your awe for your teacher should be like your awe towards G-d," the following would seem to be relevant.
There is a well-known story (this article, in Hebrew, collects over a dozen versions of it) where a yeshivah student, in his role as a Purim Rav, says something insulting about the rosh yeshivah. When he goes the next day to ask the rosh yeshivah's forgiveness, the latter replies:
"They say that what's on the lung of someone who's sober, is on the tongue when one is drunk (in Yiddish, vos bai a nichteren is oifen lung iz bai a shikker oifen tzung). Well, then, when we slaughter an animal, why do we need to go to the trouble of checking its lungs for adhesions (sirchos)? Give it some liquor to drink before the slaughtering, and you'll see on its tongue whether there are any problems.
"Evidently, then," concludes the rosh yeshivah, "this rule applies only to people, not to animals."
In other words, the rosh yeshivah is allowing that what the erstwhile Purim Rav said (what was "on his tongue") may not really represent what he really feels deep inside ("on his lung"); at the same time, though, he implicitly calls him "an animal" for having failed to control his speech.
Given that, plus the fact that most Purim Torah is composed when one is sober (so that this excuse wouldn't even apply), I would say that it's best to be careful to not cross any such lines even as a joke.