It's not "just keep up with the patches". That's going to be a losing strat.
My feeling is that if we use traditional security approaches that seems like a losing strategy. You cannot just keep patching. I mean obviously you should, but that is not enough.
LLMs are finding zero days in operating systems, language runtimes, everything. They will definitely be finding holes in your API. It is not a question of 'if'.
As a thought experiment if this hypothetical application code were written in something resembling haskell I suspect it would actually prove fairly difficult if not impossible to find novel ways to exploit it. I think at that point an attackers only options are logical inconsistencies in the underlying business logic (see that one NASA rocket) or bugs in the compiler and runtime.