Blocking toast messages is important to me, and over the years, I have searched everywhere for how to do this. The only way I have been able to accomplish this is outside of Tasker and through the use of a module which requires Xposed or LSposed. It's an ancient Xposed module that still works for me. The module is named UnToaster Xposed .
That module allows toasts to be blocked by package name, by regex match of the toast text, or by both, and multiple toast-blocking rules can be specified.
Using Xposed and LSposed requires a module called riru, however, and that requires Magisk. In other words, you need to be rooted.
I'll be very happy if someone can provide a non-Xposed, non-riru, non-Magisk way of blocking toasts. However, I am not optimistic, given that I have been searching to no avail for such a thing for years.