If a different approach is possible, I'm open to suggestions!
Don't do emergency stop buttons in software.