Replacing a vulgar expletive with a substitute more suitable for mixed company or tender ears. E.G.: shucks, shoot, darn, fudge, dagnabit, etc. Euphemism seems too generic.
Bowdlerism, bowdlerization - usually in reference to doing it systematically to a work of literature, a movie, etc.
But I think just euphemism is correct too.
“Minced oath”
Isn’t the OP the exact definition of euphemism?
Bowdlerizing didn’t always or even usually provide a softer word: it cut the offensive passage of the text. Minced oath is more narrow than euphemism. It does cover the words used in the OP, though.
Edited because of being ninja’d.
I think “minced oath” is it. It’s also interesting to see minced used in another word related context along with “mincing words”.
Nevermind
A euphemism doesn’t have to substitute for a vulgar expletive, just for something that people might not be comfortable saying bluntly (e.g. “passed away” for “died”).