Tasker's developer doesn't seem to be very security-minded. So even if you trust the Tasker apps not to abuse their privileges, attackers might.
For example, any app or website can start an existing Tasker automation:
https://www.reddit.com/r/tasker/comments/1ficluu/why_can_any_third_party_app_or_website_run_any_of/
To launch a task through the command system, a third party app needs to declare and manually be granted the net.dinglisch.android.tasker.PERMISSION_SEND_COMMAND permission. Yet any app or website can run any task by launching tasker://assistantactions?task=TASKNAME.
This cannot be disabled.
There's the option to lock certain things behind a PIN but it can be easily circumvented:
https://www.reddit.com/r/tasker/comments/1lluum6/bug_tasker_splitscreen_lock_removaloverwrite_bug/
Tasker asks for All files access just to read a backup file.
The current developer sometimes makes remarks on Reddit about how he didn't know Tasker could do X, or how exactly it does Y. Seems he's not intimately familiar with (all of) the inner workings of Tasker.
From using Tasker for the past couple of years and reading the Reddit community, I got the impression that it's kind of a miracle that Tasker exists, is still maintained and—although I encountered lots of bugs—mostly works. I suspect the code might be a hot mess.
The dev, who seems to be a fine person overall, seems to be more motivated to add new features like AI integration than to address long-standing issues.
Things to take into consideration when considering if using Tasker fits your threat model.