This is 2023 and we are well into the age of ubiquitous, cheap, small cameras.
Place cameras such that paths can be observed at a safe distance and diagnose problems in powered machinery without placing a person in harm’s way.
What does work is to disconnect the motors while keeping the rest of the electronics powered up but not all industrial robots have such a facility. The e-stop will disconnect everything and that stops you from doing things like firmware upgrades. And when things are broken it gets even more complicated and unpredictable.
Servicing machinery like this is difficult, sometimes dangerous (but not even the most dangerous, for that you have to go visit a steel mill) but not impossible. The biggest danger really is familiarity with the machines to the point that you stop to respect them, that's when you are really in danger. Personally you can't pay me to go near one when it isn't locked out, I'd much rather field strip it and test the components one by one than taking a risk but a service tech might be promised a bonus if they can get it working again quickly and that might cause them to work in less safe ways.
I've seen people do incredibly stupid stuff with machinery and I've also seen the results in terms of fingers and sometimes eyes or whole limbs lost as evidence of prior fuck-ups. And some of those people still took risks afterwards.
Walk into any metal machining shop and just watch, it won't be an hour before you see someone do something that they shouldn't be doing. And in almost all cases it will end up without anything being damaged or someone being injured. One more step on the 'normalization of deviation' track. It always ends the same.
Now experts will also do stupid shit, but they are the ones who should be able to judge what risks are involved.
And before anybody sees that 'Asia' comment as somehow politically incorrect: the statistics are pretty damning, Asian operators abroad have less than stellar safety records and very high pressure on industrial workers to meet their (sometimes unrealistically high) quotas and I would not expect them to do any better in their home countries.