Go toPasswords & Accounts(formerlyAccounts & Passwords).
Go to theAccountssection and choose an email account.
Tap the email address again where it saysAccount.

Scroll to the bottom and selectAdvanced.
In theMove Discarded Messages Intosection, choose eitherDeleted MailboxorArchive Mailbox.
This determines whether you see a Delete button or an Archive button when you swipe in Mail.

Confirm thatDeleted Mailboxredirects toTrashif you want to swipe to delete emails.
When you set swiping toArchiveinstead of delete, set theArchive MailboxtoAll Mail.
With archiving set as the action that discards mail, you candelete from the archiving buttonbut not by swiping.

Instead, selectMore>Move Message, then selectTrash.
TapTrash(orArchive) to process the email.