I was speaking abstractly, not about the OP theme - a logical fallacy is a logical fallacy, even if it provides a useful heuristic.
Even if the opponent wants you to do something, it might be the best for you.
Think about the game of chicken [1] in game theory. If the opponent puts on a blindfold and makes a precommitment, they want you to swerve - that's what they want! But it would be foolish not to swerve and crash. Once the opponent precommits, you have already lost, and you decide how much both take home.
That's even without accounting for different target outcomes or one of the sides knowing more about the outcomes, that might be in play in the OP discussion.
Example of the first, for the OP discussion: if the mayor that banned the burkini only looked after votes, "That's what the terrorists want!" yeah, but for the mayor, short-time the outcome is good, and long-time, other might solve the issue.
Example of the second, for the OP discussion: if the terrorists want us to make a step that would be their unavoidable demise, but only us would know it, "That's what the terrorists want!" yeah, but they are clueless and/or crazy, our choice is good.
Anyway this is all just for the sake of imagining and hypothesizing :)
[1] https://en.wikipedia.org/wiki/Chicken_(game)