I have been asked to develop an app that will record and later \"play back\" touches and gestures onto another app running in the foreground.
From my experience and
It's actually possible with facebook's idb: https://github.com/facebook/idb/
As it stated: Remote Automation. idb has a “companion” that runs on macOS and a python client and cli that runs anywhere. This enables scenarios such as a “Device Lab” within a Data Center or fanning out commands to large numbers of iOS Simulators.
As facebook stop support on WebDriverAgent, it's the best option we have right now