Ok, so to separate different issues:
1. I guess you'd agree now that there is no specific issue in the latest version per se. Right? (You were able to run for several days without any problem.)
2. What you observe at this point, seem to be some isolated glitches. They are usually harder to "debug" if they are intermittent like that (i.e. not reproducible).
Those glitches could be due to the (1) phone, (2) Android, (3) router, (4) ISP (cable or DSL modem), (5) DNS servers, (6) IMAP/EWS server, (7) aliens, ... :-)
This morning, my beloved laptop that has served me reliably on 4 continents, lost connectivity in my house, about 10 meters away from the Wi-Fi router. The wi-fi connection stayed on, and skype hadn't informed me yet that my peers went off-line, but Thunderbird failed to save the message draft on the server.
There was some glitch (possibly connection to the DNS server, as the already existing connections were working fine), maybe in the NAT, or something else. And the rest of the devices, including my phone, didn't issue any error.
I found no clear reason for that outage, but I didn't blame Thunderbird.

3. If you catch the problem in the debug log, - send it to the developer kmansoft / gmail.
I am sure that if Kostya sees something that might give a clue about the culprit, he'd be happy to share that with you.
Or, maybe, that was just a "one-off" glitch, in which case your problem is completely resolved by disabling that battery optimizer. In which case, it would be appreciated if you let us know too.
(BTW, read the FAQ, currently the last item:
http://www.aqua-mail.com/?page_id=227 , especially if your phone is running MIUI.)