The devil is in the almost. That's where the inability to trivially design a framework to cover all those cases comes in. That's the little subtle differences in business logic, that turn into different flavors of tech debt, that keep people in a job for a long time.
Tools and abstractions will improve, but here's the flip side: have you ever worked on a project where you consistently delivered 100% of what the stakeholders asked for, on time, with no negotiation or compromise needed? I haven't, so I think the more we can deliver, the more that will be asked, for quite a while.
Kind of the way a compiler generates optimised machine code from our higher level languages now.
We've tried. The problem with layers of abstraction is that they're leaky, and don't always work.
For example, simple SQL is easy. Optimizing SQL requires intimate knowledge of your db engine.