Based on larger applications I worked on the biggest issue is the fact that you can only connect to one database server if that server is scalable but still acts as one server for Mendix it works. You can add multiple app containers running the runtime server to perform the calculations on the application side of things.
The DB queries are not always optimal but you also have a large handle on that by making sure you follow Mendix's best practices, which are even part of the advanced developer certification.
I do not really agree with unneeded code layers, the Mendix platform has been built to reduce the time to market and allow for simplification on many layers, this will cause overhead if you really want to build something that is bleeding edge in regards to performance, but will provide you with a whole lot of advantages in terms of agile development with close business involvement.
C++ and Mendix are not comparable. In that case, it would be better to compare Mendix with whatever platform generates C++
You could of course think about a hybird solution. Off load some of the really heavy stuff to a C++ application that connects via a REST wrapper. And let Mendix handle the user interaction, data entry, data publishing, etc.
Not directly answering your question, but food for thought:
https://www.mendix.com/blog/application-built-component-based-architecture/
https://www.mendix.com/blog/microservices-devops-help-cios-realize-business-alignment/