The problem with Wordpress is that once you need to do something outside of the norm then all of the sudden you need deep knowledge of Wordpress's inner workings.
I spent a very brief time as a contributor to WP internals (not core by any means but a handful of contributions) and not only do you need a lot of internal knowledge to do anything outside of point-and-click, like you said, a lot of the core folks had never worked on any other large software projects, didn't do anything outside of WordPress, and had very little desire to make sure what they were doing was sound from a software engineering / code quality standpoint. It's a pretty great example of the big ball of mud / spaghetti code cliche.
I recall there being several other also-rans, but am having trouble recalling names.
Once the plugin ecosystem sprung up around it, WP was off to the races.
What I mean is: having something like Primo that allows visual management of such dynamic blocks and themes would be nice, so Editors can just play around with the result of their content calls (which the CMS handles transparently, doesn't matter if a SQL query or an API call).
Once the editor is done with his work, if you want to compile a bunch of HTML/CSS and push to Netlify, that's fine. But his interaction with the CMS is not static at all.
A probably very naive solution to that I came up with and experimented with is keeping track of all things that go into a page, and tag the cache of it with them, so I could invalidate all cached items that refer to a thing that was just changed (where that thing can be anything, a tag, the site title, whatever), but I ended up scrapping in favor of caching everything for 1 hour no questions asked, because it was just total overkill for my use case.