I assume the replay happens on the same setup of device model, screen orientation and the app UI. Thus, the exact coordinates of events are expected to be the same during recording and replay. The device can be rooted.
According to the paper about RERAN tool one can record and replay very low-level UI events using the
sendevent tools, both available in Android SDK.
The RERAN tool can do the job, but it requires root and it is unclear if it can work on Android newer than 2.3.4. RERAN doesn't use
sendevent because it has small lag that makes it unable to faithfully replay the event stream. Because the tool uses its custom solution instead of
sendevent, it requires for the phone to be rooted.