Richard Livingston(bug opener), please note that this bug opened with your comment #0 is not meta bug for "trash folder selection at Server Settings doesn't work as expected".
Is problem you saw with other than Gmail IMAP is one of (2), (3), and (4) in my comment #30?
As for "Tb ignores trash folder selection at Server Settings if Gmail IMAP"(your comment #0), I don't think it'll be solved soon.
One of best was ways to avoid "automatic purging from [Gmail]/Trash after 30 days by Gmail" is still "Remove immediately" model, or "Just mark it as deleted" model with "auto-expunging of Gmail=Off by Advanced IMAP Controls of Gmail Labs".
With any IMAP delete model, next can be an emulation of ordinal "Move to trash" model, if Gmail IMAP.
(i) Create a Tb's Tag of $$deleted(lowest order) with tag label of "Deleted".
(ii) If you want to delete a mail, add Tb's tag of "Deleted".
("1" can be used for shortcut by $$deleted).
The added tag is shown for copy of mail in any Gmail IMAP folder.
(iii) If you want to purge "mail tagged Deleted", copy(or move) the mail to
[Gmail]/Trash.
(iv) "Undo of delete" is possible by "remove Tb's tag of Deleted" and
"copy(or move) back to a folder from [Gmail]/Trash", if within 30 days.
If you create Saved Search folder named "Pseudo-Trash" with "search target folder=[Gmail]/All Mail" and search criterion is "Tag contains Deleted", you can use it as ordinal Trash folder.
Richard Livingston(bug opener), please note that this bug opened with your comment #0 is not meta bug for "trash folder selection at Server Settings doesn't work as expected".
Is problem you saw with other than Gmail IMAP is one of (2), (3), and (4) in my comment #30?
As for "Tb ignores trash folder selection at Server Settings if Gmail IMAP"(your comment #0), I don't think it'll be solved soon.
One of best was ways to avoid "automatic purging from [Gmail]/Trash after 30 days by Gmail" is still "Remove immediately" model, or "Just mark it as deleted" model with "auto-expunging of Gmail=Off by Advanced IMAP Controls of Gmail Labs".
With any IMAP delete model, next can be an emulation of ordinal "Move to trash" model, if Gmail IMAP. Gmail]/ Trash.
(i) Create a Tb's Tag of $$deleted(lowest order) with tag label of "Deleted".
(ii) If you want to delete a mail, add Tb's tag of "Deleted".
("1" can be used for shortcut by $$deleted).
The added tag is shown for copy of mail in any Gmail IMAP folder.
(iii) If you want to purge "mail tagged Deleted", copy(or move) the mail to
[
(iv) "Undo of delete" is possible by "remove Tb's tag of Deleted" and
"copy(or move) back to a folder from [Gmail]/Trash", if within 30 days.
If you create Saved Search folder named "Pseudo-Trash" with "search target folder=[Gmail]/All Mail" and search criterion is "Tag contains Deleted", you can use it as ordinal Trash folder.