Without root, the only way to do this is to use a plug-in, e.g. AutoInput, to simulate screen taps. I use
this subroutine. Use Perform Task to call this, setting %par1 to the package of the app to stop. Here is the description of the task:
Stop App
A1: Send Intent
Action: android.settings.APPLICATION_DETAILS_SETTINGS
Cat: Default
Data: package:%par1
Target: Activity
A2: AutoInput Action
Type: Text
Value: Storage
Action : Click
Timeout (Seconds): 20
A3: AutoInput UI Query
App Package: com.android.settings
Text: CLEAR CACHE
Timeout (Seconds): 20
A4: Wait
MS: 100
Seconds: 0
Minutes: 0
Hours: 0
Days: 0
A5: AutoInput Action
Type: Text
Value: CLEAR CACHE
Action : Click
Timeout (Seconds): 20
A6: AutoInput Global Action
Action: Back
Timeout (Seconds): 20
A7: AutoInput Action
Type: Text
Value: FORCE STOP
Action : Click
Timeout (Seconds): 20
A8: AutoInput UI Query
App Package: com.android.settings
If you force stop an app, it may cause errors.
Timeout (Seconds): 20
A9: AutoInput Action
Type: Text
Value: FORCE STOP
Action : Click
Timeout (Seconds): 20
A10: AutoInput Global Action
Action: Back
Timeout (Seconds): 20