But braking is a solved problem. Apply the maximum force to the tires, until right before the tires begin to slip. Then, reduce the force to prevent slipping. Stay within the "static coefficient of friction", which is higher than "dynamic coefficient of friction".
Alternatively, there's also "let the human do it". (Aka: threshold braking), but most people prefer to have the computer do this task during an emergency.
This algorithm has been used in anti-lock brakes for decades at this point. I'm not sure why it would need an OTA update to improve. Once this algorithm is properly implemented, then the only thing left is to buy better tires and use better rubber to get better grip.
This CR report suggests that Tesla's braking behavior is suboptimal. There's no reason for a smaller, lighter Model 3 to have a worse braking distance than the freaking F-150 truck.