Mail only archives mail when you select to Archive using one of these options.
- Archive icon in the Toolbar
- Under Mailbox in the Menu bar > Archive
- Move to an Archive folder
Let's start with your Gmail accounts....
Gmail is not standard IMAP.
In your browser, Messages in the Inbox are also in All Mail. Apple Mail tries to work around the oddities of how Gmail handles messages.
The Gmail All Mail folder is the same as the Archive folder. In addition Gmail's delete and trash are two different processes.
Gmail’s labels are folders in an email client. Gmail can assign multiple labels to one message in your browser but these will be multiple messages in your email client.
I would prefer it if no email were archived at all. I'ld rather save what I want to folders and delete the rest.
Try this option for your Gmail accounts. Set up one account first so you test the setting to customize for you.
Log into Gmail account in your web browser.
After logging in to your Gmail account, select Settings under the gear in the upper right corner of the page.
Select Labels
Uncheck All Mail account to sync. This only removes the All Mail folder in Mail. It does not delete the messages in Gmail on the server.
Next test trashing a message.
In Mail, delete a message. Now check in web browser to see if it's in Trash. If yes, then you should be able to use these same settings across your other Gmail accounts.
Your other IMAP accounts are standard IMAP. If you select not to use Mail's Archive feature, you can simply move messages to custom folders and delete.
Always verify results by logging into the accounts in webmail to verify actions taken in Mail.