what is the maximum ESP32 app code space for 16mb flash?
Your concern may be unfounded.

Yes, the stock ESP32 app is about 0.5 megabytes, which is 50% of the default 1MB app partition. However, any code you write, or any libraries you add to it are not going to consume the other 50% that quickly.

In my experience the code you add will barely register at all. When I started a project some time ago - that was my first impression, too ("whoa, the `hello world' stuff takes 500kB, wtf?"). But after two years and many, many thousands of lines of code, it has grown to only 73% of the allowable space, and the project is finished. What I mean is that you should worry about partitioning and insufficient space only after you actually exhaust it. I'd suggest keeping the default partitioning, especially if you're considering using the OTA update functionality - it is a very useful thing if you can use it in your specific case.