First step with current Reffing system in place is to develope a 3d camera system covering the entire court for reviews and calls. 64 - 4k cameras above, below, and on sides would be more than enough.
Second step develope a smart ball with trackers giving GPS location, rotation and impact data in real time that feeds into camera system.
Third step develope an AI specific for that sport that knows all rules, parameters, etc and can interprete the camera information for fouls and violations.
Forth step slowly give more and more responsibility to the AI until only one ref is needed as a manager behind the desk. Aka self driving cars.
I think steps 1 and 2 could be done now. Step 3 is out of my wheel house but I've got to think we are getting close.