Okay, let me give you some insight. The major ram consumption is due to the way how the zone server is made (zone.exe file). For most zones, it loads almost all lua files into the heap → later puts them into the stack. Now, obviously most zones don't need all the luas, so if I remember correctly, the sc can do some kind of regulation on which array of luas it will load, however, It's still way overestimated then the actual use case. Which means, its wasting a lot of lua files into dead ram which will never be used on the load order of any zone.
Now, the next problem occurs, if you keep an eye on the code. RW made a decent job writing the main engine (the founder of rw is a passionate guy who went over to the USA and studied CS (computer science) + he had some decent jobs as well) but as soon as the main components were done, it switched into a business, no longer a passion thing. Long story short: the code around the main engine is horrible and a clusterfuck of c++ 2004/5 skills. So much could be optimized by today's standards.
In the 64bit release, we already fixed many ram leaks in the code, however, it would take around the same time (7-9 months) to also fix all the ram free bugs (aka mallocs/allocs).
TLDR:
Yes, there is plenty left that could be optimized but fixing the need of loading all luas and freeing the ram correctly, is more work than anyone is willing to invest. We are talking a complete code restructure.