As an experienced android developer (5 years) I can tell that it's not totally true.Totally agree. But i believe its the app developers.
Something just isn't right. Some apps work flawlessly and consume minimum battery and others just get out of control every time they add new features.
If you go into google play store and check for updates. You are guaranteed to find apps that are updated almost everyday.
There's not so much we can do to optimise apps performance, there are some guidelines to follow suggested by Google directly but I can tell that unless you're working on a very big project (eg. Twitter or Facebook apps) it will not make much difference in real world to the end user, expecially on High End devices with a very powerful processor. I mean, raw power of Exynos 2200 or Snap 8 Gen 1 is enough to make every app to run smooth even if its coded like crap.
Most of the optimisation is done by the compiler and the OS itself (I mean the vanilla android os, regardless of the manufacturer customisation).
What really makes the difference is how the manufacturer decides to manage system resources: heavily throttling can make even the lightest app to run very bad, not to talk about memory management etc. I think Samsung has a lot of work to do with its OneUI in this scenario.