For Plot Reasons™, the PCs challenge, or are challenged by, a vastly higher-level opponent to an exhibition match(1) of some sort. Maybe an elder gold dragon wants to test the PCs' mettle before giving them a quest; maybe the local gladiatorial arena has a prize too good to pass up; maybe an arch-lich will only hand over a critical artifact if the PCs demonstrate they're strong enough to handle it.
Whatever the reason, the PCs need to fight an opponent of a far, far higher level than them. The opponent will face the PCs themselves; they either don't want to send a minion to fight in their place, or don't have any. However, the opponent's intention isn't to wipe the floor with the PCs; they genuinely want to see what the PCs are capable of.
How can I build a winnable encounter against a vastly overpowered opponent in a way that's fun, challenging, and mechanically interesting for the PCs?
Note: This question is about Pathfinder 2e, which does not have bounded accuracy like D&D 5e. A typical PC will miss most attacks against a creature only a few levels higher than them, and since a nat20 is not a guaranteed success in PF2e, it may be impossible to hit the vastly overpowered opponents in this question under ordinary circumstances.
I've tried various methods in past campaigns, but none of them managed to be all of fun, challenging, and mechanically interesting. Fighting directly isn't challenging or mechanically interesting, since the PCs have effectively no chance to even hit, much less win; while the opponent is likely to take out the whole party in a round or two. Leveling the opponent down isn't challenging, and sacrifices the fun of facing a powerful opponent while also breaking immersion. Fudging on the fly isn't mechanically interesting, since the players can't collect reliable information to strategize with; and worse, it can feel patronizing or like the PCs didn't earn their win, taking away the fun of the match.
I've also tried making the match not a battle to KO, but rather a strategy challenge such as reducing the opponent to half health, reaching a goalpost first, capturing a flag, etc. This isn't a solution on its own, since even if the PCs have the most brilliant strategy in the world, the opponent will likely still brute-force a win thanks to vastly higher stats. However, it can reduce the impact of some of the most unbalanced mechanics, like the PCs being incapable of landing a hit except on a nat 20, or the opponent's high HP making the fight a slog.
(1) For the purposes of this question, an exhibition match:
- Is not a fight to the death; the participants do not want to kill each other
- Is not used by the powerful opponent to merely curb-stomp the PCs
- Allows the PCs to demonstrate their skills/prowess/strength/whatever to the opponent
- Must be between the PCs and the powerful opponent, not a minion or other stand-in
- Must be possible for the PCs to win, if difficult.