Earlier quoted context omitted.
I mentioned this in another comment, but the whole reason the archive is able to be optimistic is partially because they offer the undo via toast. Otherwise its likely they would add an 'are you sure' plus a loading-state when doing these "semi-destructive" actions.
Undo via ephemeral toast seems like a bad idea also. I guess if the toast hanged around until the next toast it might make sense?
In other words, if you delete an email and it goes to the trash folder: good use of toast + undo
If you empty the trash, and there is nowhere the user can go to unempty it: bad use of toast + undo
Its also useful as a sleight of hand eg when cancelling an action you havent yet taken (which actually is generally what a toast + undo actually is). The best example of this being toast + undo for an email send