WordPress is an excellent Publishing Platform, with widespread industry usage in the Media Industry. It's intended to be easy to use for Authors and Editors and extremely extensible for Developers. And with the REST API things got even better.
The community is friendly and welcoming for Developers and End-users, and they make things extremely easy for both.
I know you're post is based on your own experience, but you can actually (and should) follow best engineering practices when developing for WP.
We're currently developing a Publishing Platform where the Authoring takes part on WordPress, the delivering and publishing goes thru a pipeline of with Kinesis, lots of Lambdas and Elasticsearch and the frontend gets server-side rendered thru a NodeJS + VueJS application.
All three stacks (WP, Lambda-based and NodeJS+Front) follow the same engineering process: Code is under source control, changes get automatically tested, then it gets peer-reviewed, once approved is auto-deployed (CI/CD) to a staging environment, where all the containers are spawned from environment vars + code checkout + thirdparty services. If all goes well, it will eventually make a release.
We don't have to do anything different for WP than we do for Node, Go or the part of the stack that is deployed to AWS FaaS. WordPress is just another codebase to us. We follow all the good engineering practices that you would do for a highly-scalable application on WP that if it was a highly-scalable RoR App.
Remember that most of the quality attributes of your software (like scalability, availability, reliability...) depend on your architecture, not your framework.
As others mentioned you should have definitely dig into the repos for the contributing members of the WordPress community like 10 up, human made, bocoup, roots and automattic of course. Root's post about WP as a 12-factor app is a good place to start (and look at the date).
They all show some impressive engineering skills with WordPress as their base.
At the end, WP is just another tool in your belt.
PS: Before joining this project I didn't like WP. I understand now why it's so widely used. It's because authors and editors are familiar with it. It offers a great workflow for them and they are used to it.
So it's all about the User eX__perience, not the Developer eX__perience. Is up to you to define the latter.