I'm assuming you're mostly asking in relation to the recent incident in America. I've no solution to that sort of thing, certainly looking from the outside in, policing in America appears very adversarial with a "them and us" attitude and obvious ingrained racist undertones. It baffles me how police can get away with what they do there.
That's not to say policing is perfect where I'm from but where I'm from police police with consent of the communities they police, at least that's the theory.
Training is the big thing. Following their PATH training would have prevented the recent death. Another thing that is helpful in general is for the public to be trained in how to deal with the police and what their rights are.
You also need accountability for when training is not followed. There are laws granting amnesty for most official actions police make, so these would have to change.
The only technical thing I see being an asset to prevent or reduce force escalation would be body cameras, both for police (required) and citizens (optional). This could hold people accountable for their actions, but only if the policies change too.