tjk What if I am 100% confident that the app is not malicious?
There is no 100%.
App developers could turn malicious or their machines could be exploited. Could also sell or pass the app to a new malicious developer. Same things could happen with the developers of any libraries the app uses. Theres numerous recorded cases of these things happening with all kinds of software.
Whoever builds the version of the app you use could be malicious or compromised.
As a final possibility the app on your device could be exploited.
An app granted accessibility services has more control of the device than the user. It is much more dangerous than granting an app all the standard permissions as it can block the user from doing things, operate the device, use apps and display whatever it likes on the screen to hide what is really happening.
tjk Why not provide some sort of way to achieve this sort of functionality securely?
By the nature of the privileges required to perform the accessibility tasks there is no way to easily make a more secure implementation.
Unless you need genuine accessibility aids its not hard to avoid using apps, or the functionality within apps, which require it being granted the ability to act as an accessibility service. That is the way to address this security concern.