Hy,
I've read your requirement.
I can build a system hook event for keyboard and mouse using Windows API with c++, Java or nodejs.
for the broker, we can use coap or mqtt. the best for latency is coap(udp). but you need reliability for the connection, thus we can set qos to level 1 or 2. if you prefer to use mqtt(tcp) is fine though.
the next thing is make sure the event is triggered in sequence. I'll make sure the packet is triggered in sequence.
50 clients is fine. I was testing more users for my iot project back in the University.
feel free if you need to discuss with me.
br,
hilman