I suspect issues like this are one of the reasons why iOS locked down accelerometer access in Safari. Motion sensors have a lot more potential for malicious use than most users think.
[0] https://developer.apple.com/documentation/coremotion/getting...