I would also recommend OBS as another commentator has mentioned. I believe in both cases you will need an RTSP server to handle multiple client connections.

I looked into a similar ffmpeg solution a couple of months ago and broadcast an libx264 video only stream with ~1 second latency to an rtsp server: https://gist.github.com/andrewmackrodt/88c2233fb9cc4797ada93...

However, I found this solution to be too CPU intensive as I was unsure if/how to instruct x11grab to interact with the GPU directly. Perhaps if I used my nvidia card for encoding it would have been more performant. However, OBS makes this entire process much easier.

If stuck for a server I've used this in the past. nginx with an RTMP module.

Also linking a config file I commented for an example. Unsure if it'll still work and it could definitely be simplified for OP's needs. It was a proof of concept for a streaming service I was thinking up before realising how much money I don't have, haha

https://github.com/arut/nginx-rtmp-module

https://gist.github.com/cohan/7f676d3f561be62d0550785c015f00...