MacroDroid Is A Very Capable Device Automation App
I made a root-less lock-screen button that also touches the Multitask button to clear all apps to save battery (pixel coords are for LG G6 and may need adjustment for your device) :
Home | MacroDroid
Featured Play Store Newbie: MacroDroid [Tools] - TalkAndroid.com
I wanted to have Auto Data Sync to turn on every 30 minutes to save battery, did I made it right? : r/macrodroid