You mentioned your uncompressed binary was 25MB. The compressed version still must be huge.
Did you look at using the TinyGo compiler? It should help some, and I'm curious what the difference is, and whether there were any blockers to using it.
I did actually briefly look into it! I was hoping it would work for us, but the first time I tried to perform the compilation with it, it failed due to issues with support for at least one of the dependencies we bring in. I don't remember the exact failure as its been a few weeks, but since the bundle size went to down a manageable (but still largish) 5MB once we enabled aggressive caching, fixing our code to work with TinyGo was deemed less critical.
I very much hope to get back to it soon and see if we can move over to it.
Did you look at using the TinyGo compiler? It should help some, and I'm curious what the difference is, and whether there were any blockers to using it.