I'm wondering if there's a word that describes the phenomenon where some party takes some action to remedy a situation and the result of that action makes the original situation worse.
First, "shooting oneself in the foot" doesn't necessarily imply that you were trying to remedy a bad situation, only that your actions have caused yourself misfortune in some way.
However, the examples you cite both sound more like the Streisand effect, in which attempting to suppress or censor something ironically results in an increase in its general popularity.
If you were looking for a more general word, there are a lots of words which indicate different degrees of this sort of mistake or error, like gaffe, fumble, and botchbackfire. Gaffe and fumble especially imply that you've caused yourself misfortune in some way, though they tend to apply to verbal actions, as in,
The politician committed this election cycle's biggest gaffe when he gave reporters a piece of his mind, without realizing their cameras were rolling.
Backfire implies that you've caused yourself misfortune in a more general way, as in,
The plan to donate the company's excess revenue to charity backfired when it was revealed that the charity in question was the CEO's foundation.