We used something called Power Manager in the past, which we configured to pop up multiple warnings to user before the machine would force them off if they idled to long. We use Deepfreeze which makes warning the users a big deal before it deletes any files they have open.
I found this IdleLogout on here recently in past threads which seemed to be a perfect free replacement, but in my testing, it doesn't seem to function on Mojave.
Already tried the log off user policy in JAMF, gets stuck with opened files like word docs.
Any ideas?