Insurance companies I deal with always say that, in the absense of exceptional circumstances, in the case of a rear end collision the person who hit the other car is exclusively at fault and its the only type of collision where the blame is not shared.
I'm afraid it's your full responsibility to keep enough distance to brake in time, in case the car in front decides to brake, no matter how hard it decides to brake, or for what reason (a long truck invading his lane, a brake check, a kid jumping into the road, or a mosquito in his eye). A different matter is if the car didn't brake on its own, but braked against an oncoming car, against a roadside tree, etc. That can bring the vehicle to a halt in an instant, and that's something you can't reasonably predict or adjust for as easily as the regular driving shown in the video. Typical numbers is 2 seconds of distance to the car in front (if there's a car), and always as slow as necessary to be able to fully stop within your line of sight (in corners, fog, nighttime, slippery surfaces, etc).
Yeah I am a bit on the agressive side when it comes to driving style , i hope this gets better when i am getting older thank you for response