Obviously it is safer to have longer follow distances, all things equal. But you don't accomplish that if you leave a long follow distance that is cut off a few seconds later by another car trying to get ahead. You end up with a constant stream of cars cutting your follow distance to less than what it would have been if you had just stayed slightly closer to the car in front of you.
We don't live in an ideal world, and having a bunch of cars merging in front of you definitely makes you less safe than having a static situation. I try to make sure I can see through/around the car in front of me, so that I have advance notice of what's happening down the road.
Everything I've read points toward larger margins of safety (longer distances, slower speeds) being safer.
See e.g. https://publications.lib.chalmers.se/records/fulltext/252480...