Do you know how to use UI Interactions?
I know it hasn't been made native yet but the way I get around this is using automate since it has this capability, and creating a flow that clears the cache of my target app and just using macrodroid's launch shortcut action in order to clear it out. not exactly a clean way to do it but it's the only way I have found that works.Clear app cache (not all data) would be a great feature