There is no "erase email storage" in AquaMail.
There is "optimize" email storage, which removes old messages and compacts the database, but it still goes by your (user) settings, the "messages to sync" / "messages to keep".
Please check the size of the app's database in Menu -> About (in the app).
Messages.sqldb is where the text of all messages is stored.
Attachments are cached on "the memory card which is not a real memory card but looks like one, and really is built-in" -- whew, Android makes it complicated -- I mean the "16 GB" or "32 GB" in your phone model's name.
Optimizing Messages.sqldb:
Menu -> Optimize the database.
If it's still large-ish, please reduce how many messages you're asking the app to "keep up to date" and to "cache on the device in case you need to access those older messages".
App settings -> mail, receiving -> "messages to sync" (defaults to 25 or 50) and "messages to cache" (defaults to 250).
Can be overriden at the account level, please check too:
Long press your account -> options and folders -> account options.
You may want to set "messages to sync" at 100 and "messages to cache" to 250, or maybe try 250 and 500 (if you like seeing a larger number of your recent messages".
After adjusting those settings, please do Menu -> Optimize the database again.
The app trims any messages beyond the Max ( "messages to sync", "messages cache" ) from the phone only, automatically, every night.
Attachments.
Cached on the "large built-in storage", under ../Android/data/org.kman.AquaMail/files/parts
Automatically removed when their messages are (removed), per above. Or you can delete everything in that folder, and if you access one of those attachments again, the app will re-download.
Re: what you wrote about Thunderbird.
As should be clear from the above, AquaMail provides a "view" into the most recent messages on the server.
As this "view", over time, "slides" away from older and to the newest messages, your messages *are not deleted from the server*.
So you'd be fine even if you set "messages to sync" to 25 and "messages to cache" to 100 -- very very "small" settings.
I do know that if you tell Thundebird to only keep a limited number of messages -- it actually starts deleting your older messages from the server. Ugh. Did it once, good thing I caught it in time.
AquaMail is not like that and will not delete your older messages from the server as it "moves the view" of your messages as time goes on.