Is there a name for these rhetorical devices?

First example: “Don’t make me go all reaper on your…AS I was saying.” In other words, you substitute an expected naughty word with an innocuous word. Cole Porter’s “If she says your behavior is heinous, kick her right in the Coriolanus!” is a variation of this.

Second example: Someone is making a political speech, for example, and says something like, “I won’t stoop so low as to dredge up the rumor that my opponent is a pederast. Nor will I mention that my opponent has been indicted for tax fraud.” The speaker claims a higher moral ground while still slinging mud.

Do these have a formal name, like zeugma or synecdoche?

That’s a type of euphemism, I believe.

I have discovered that my second example is apophasis.

Mangetout (or should I say Crandall Spondular?), I am in awe of your writing skills. However, I don’t think my first example is a euphemism, which is defined as a substitution for a polite term for a distasteful or vulgar one. “Expecting” rather than “pregnant,” for example.

The point of my first example is that the substitute sounds like the vulgar term, but has a literal meaning that is completely unrelated to the vulgar term.

In fact, the Wikipedia article on euphemisms leads me to the Wiki article on minced oaths, which is a great phrase even if it’s still somewhat broader than what the OP might be looking for.

I started with metonomy and synechdoce since they’re SIMILAR (something “related” standing in for the object, in this case a word).

I think it may be a special case of vulgar malaproprism

one example is:
“good to be back on the old terracotta” (terra firma)

It’s not completely on
Don’t make me go all reaper on your…"
<interjection>“AS I was saying”

or
“What the Hel” <teacher walks in>“lllllllo”

They all appear to be done by some interjecting factor that causes that. It appears, in both cases to (obviously) be a comical, interjectory form of censoring (in one case self, and in one case covering for another).

Another similar form is
“This sucks”
<clever friend who doesn’t want him in trouble>
“Thaaaaaaaat we’re not going to be here for much longer” <nudge>
“Oh, right, yeah!”

So what we’re left with is:
An interjection
Some sort of malapropism (bordering on Catachresis if I’m understanding what that is correctly). Catachresis - Wikipedia

My choices on what to call it are either
An interjectory malaproprism
Catachresis

So I typed all my thinkinginto this post, I hope it at elast got us somewhere. You can look and see if anything in this post catches your eye.

o/`I have a sad story to tell you
It may hurt your feelings a bit
Last night I walked into my bathroom
and stepped in a big pile of ssssssssssh

…aving cream!
Be nice and clean!
Shave every day and you’ll always look keen! o/`

syncatabasis could also work…

Theres noa rticle on it, but the meaning is:
adaptation of style to the level of the audience

In this case, adapting a vulgarity level to the level of children, or the teacher that’s going to get you in trouble.

Oops. I see that now.

No, you shouldn’t. We go by pseudonyms here. Using people’s real name is considered presumptuous.

Just call me The Spork

I can’t tell you how badly I want to go to Café Press and design an “I’ve Been Sporked!” t-shirt.

To hijack my own thread somewhat (or even more than I already have), there must have been some reason all these rhetorical devices were given names, but it really is an odd thing, innit? Other than providing us all with another huge collection of Useless Information to Impress Your Friends, is there some situation where it is vitally important to know the difference between aposiopesis and epanalepsis?

(And don’t some of these names sound like they could be Harry Potter spells? “Conduplicatio!” “Scesis Onomaton!”)

I’d say it’s mainly a facet of linguists using terms to shorten things. I mean would you really want to say “the word that sounds like what it means” every single time you saw an onomatopoeia? I’ve written timed essays where a certain literary technique is used very often in what I’m analyzing, and can’t remember the term. The essay gets very wordy contantly having to use “the techinque that alters the syntax in the manner of” and similar phrases so as not to sound redundant.

The Assumption Song has a bunch of funny examples of what you’re talking about, you might enjoy it.