I haven't used a recent macOS in years, but I use the following command to get a fullscreen screensaver and locked screen on (Devuan GNU+) Linux. It's probably about as secure as a cheap padlock and flimsy chain or cable to lock a bike.
You can skip the 'xtrlock -f &' part to just run 'bouncimation' in a fullscreen xterm. 'Esc' exits.
If running with 'xtrlock' you must enter your password first to unlock 'xtrlock', and then 'Esc' to exit 'bouncinamation'.
The 'sleep .05' is to make it work better or more reliably. I don't remember exactly what, but there was some kind of issue that was fixed when I did 'sleep .05' before running 'bouncinamation'.