From my recent work on my advanced gesture automaton: if you’re using CGEvents etc to emulate touches to the iOS simulator, your screen has to be on and unlocked… unless you’re using something like Apple Virtualization!
Casually thinking about the Three-body Problem as it relates to gesture playback: for a sequence of t0, t1 touches, infer the centroid, determine the angle, toggle various shift and option sequences, move to t0 (mirror to t1 through the angle of t0, centroid), and then repeat.