Earlier quoted context omitted.
I have an app on my non-rooted Android phone which does this. You just need to give the app admin permissions.
Oh cool, I didn't know that what possible. What app is that?
https://notenoughtech.com/tasker/important-tasker-5-9-2-upda...
You can certainly do a lot more with a rooted device. I think it's a reasonable tradeoff to limit uncommon use cases for devices which haven't been rooted. I think the majority of users would prefer the additional security restrictions in place on non-rooted devices. For those who want more control, you can root at your own risk.