If it's really locked down, you can find USB devices for a few bucks that emulate a mouse and move by a few pixels every minute. Foolproof for those companies with nonsensical settings or nonsensical spying.
Maybe if you're slacking off, but if you're working on a project with 10-minute compile times, you can't really use the computer for anything else while it's doing that, and it's quite annoying if it decides to go to sleep in the middle of that because you haven't nudged the mouse recently enough.
If an employer is going to fire you for running caffeinate while presumably working from home (if you're leaving your laptop alone and unlocked in a public space God help you), maybe it's time to look for a new job :)