I think the rom is OK Nothing much that can be fixed.
It's the Game developers who are making the games unnecessarily heavy on RAM and processor.
I'm not sure how old you are but we've been around for a while and we still remember the first series of supercomputers from the 1989 era, like Cray-2 that was delivered with 2 gigabytes of RAM which was considered massive at the time.
Our Yuga with 2 GB RAM is actually something unheard of not so long ago..
The first computers that put people on moon and brought them back had less processing power than your pocket calculator and people could only dream of having XPERIA Z's amazing RAM and CPU power..
Right , If we jump back few generations our Xperia Z could have run the entire Apollo program assuming we connected it to a proper antenna.
That's to put things in perspective... It's never the OS (operating system) or the available RAM ..
It's the piss poor coding and lazy , substandard programmers who can't be arsed to code the game properly that create problems starting with overheating phones and laggy games.
You need to voice your concern to the Game Developers.