I’d say when it comes to being an incompetent protagonist in interactive fiction, you have a few things you could do to make it go over easier.
1). It’s part of the character/their situation. This isn’t going to work for most games on this site, but still worth mentioning. It’s easier to accept in a story when a protagonist does something silly because of inexperience, arrogance, or a misunderstanding. Since here on CoG we like having protagonists that have their levels of confidence and strategy player-controlled, there’s not a lot to be done on that front, and there’s really only so many situations where the MC is tricked/confused you can put in the story before it feels unfair- but more on that later.
2). Give the players chances to succeed while failing. Hero’s Rise gets a lot of criticism, and I generally like the series so I don’t want to pile more on that, but I think the reason the Gravitas situation feels so annoying is because not only do you fail to achieve the explicit goal, you basically can’t do anything correctly. It’s necessary to the plot for the protagonist to fail, but that doesn’t mean they have to totally fail. They might have been able to save some of the villains, learn some important information, or otherwise achieve a secondary goal. So perhaps the inexperienced young knight can’t save the dragon, but he manages to buy the royal wizard enough time to cast a spell of protection on the servants- the primary objective was a failure, but the protagonist still achieved something.
3). Acknowledge the unfairness. One of my favorite sections in terms of messing with the medium of interactive fiction on the site is a section in Choice of Broadsides were the MC has a nightmare. Long story short, all options presented are explicitly not the solution to the problem, and as the nightmare goes on more and more options appear to the effect of “Why are none of these right?! This isn’t fair!”. A similar thing happens in Fallen Hero in which the protagonist faces a situation with a negative foregone conclusion in a flashback, where the player really chooses how exactly they fail because they already know it ends badly. Last example is Choice of Rebels, specifically the winter section where, on your first few tries, odds are good you will not do well. But the game knows that, and includes several options for the protagonist to express sorrow, frustration, fear, and outright rage at their losses, including saying, more or less, “this isn’t fair!” and at no point does the game (or moreover, your fellow characters) seem to contradict you on that. In truth, the chapter is more fair than it might seem, but I think Havenstone knew that it would seem somewhat unwinnable at first, and rather than remove a section of the game he thought was important to the story, he resolved to let the protagonist feel the same things as the player.
Ultimately, the incompetent protagonist needs to be a bit of a tragic one, even in a light-hearted work. They need to be aware of their failings, and how unfair it is they keep missing the mark, and they need to be able to express that. Failure should reveal things about the protagonist, and further their story. You could always play the constant mistakes for comedy, and I like fiction that features characters who just can’t get a grip on themselves and achieve what they need to- Michael Scott comes to mind- but when that character is the MC of an interactive work of fiction, it feels like the joke is at my expense, not theirs. And if I wanted to laugh at my unending failures, I’d reminisce about middle school.
This is a great question, by the way, lots to think about.