I strongly recommend to reduce the number of "Messages to sync" in your settings.
How many messages you've set the app to sync (keep up to date with the mail server), there is an app level setting and optional per-account overrides:
App settings -> mail, receiving -> messages to sync
Long press on an account -> options and folders -> account options -> messages to sync
The larger the values, the more work the app has to do every time it checks mail or catches up to push changes. The default is 50 (for Android 5.0+).
Recommendations for your settings:
"messages to sync" and "messages to cache" to values like these:
sync = 100 (default is 50), cache = 250 (default)
sync = 250, cache = 500
sync = by date range (e.g. 14 days, 30 days..), cache = 250 (default)
The more messages the app it set to sync to the device, the more work it takes (in terms of battery / traffic), so jumping to into the "thousands" values is not recommended.