It’s quite a safe assumption that no one wants to get into a crash if they can possibly avoid it, so perhaps all that’s necessary to calculate when a car can “safely” be cut off is whether they will have time to stop, even if it’s an abrupt and unpleasant stop? It’s not pretty, but it’s the same calculation human drivers make all the time in these situations.
I mean humans do this and probably a high majority of the time make the merge with both parties unscathed. I also do not agree that you are REALLY paying much attention to who you are cutting off. Generally the process is: look for a gap sufficiently close to your exit, swoop in, if its too tight, keep going...till eventually you just stop and wait till you get the gap.