(spoiler alert) there is an undead boss in Final Fantasy 8 who is incredibly hard but can be killed using a "Phoenix down" (which is an item that revives dead players). As a kid, I got a real kick out of it.
The only way to win is to die and get a game over screen. THEN use a revival pill!
But, what if both the players and the monsters both had Wall active? That situation would have an infinite recursion problem. The solution for the game was to say that a spell could only bounce once. That solution led naturally to monsters that always had Wall up and would cast a lot of spells so that you could defeat them by using Wall on yourself.
As well as Shinning Force, Breath of Fire, Phantasy Star, and Illusion of Gaia.
And I'll second the Octopath Traveler recommendation!