This. The problem isn't the technology; that can demonstrably be shown to work in models and simulations because of things like - as you say - needing less space between vehicles, and also more complex things like reducing capillary action in the overall traffic flow (the stop-start effect you often get in heavy traffic). The reason why you don't see those benefits is the growing number of entitled drivers who ignore the signage in the hope of gaming the system for personal gain (e.g. shorter travel time), so you do need robust enforcement with stricter tolerances and more punitive fines to try and deter that.
It's the classic Prisoner's Dilemma. The best solution for the greater good is to obey the signage, but the best solution for the individual is almost always to look out for Number One. Smart traffic flow systems do still seem to improve things, despite entitled drivers, although that's probably more down to the enforcement measures keeping those bending the rules from bending them as far as they'd like to.
Algorithms also assume that people know what they're doing and will act rationally. If anyone thinks people drive this way they are clearly not paying attention to the roads.
Every traffic jam starts with just one arsehole, just one who thinks they're different, special, above it all. One arsehole who decides that 30 is fast enough for everyone. One arsehole who sits on the phone, One arsehole who cuts people up, straddles two lanes, doesn't proceed at a green light. One arsehole who thinks the rules don't apply to him (and only him) and refuses to fit into traffic.
The kicker is, there are a lot more than just one arsehole on the roads.
And don't think that autonomous cars will save us, first off, they'll never work in our lifetimes but ignoring that they will be programmed to follow the rules to the letter (not the least important reason is to ensure the manufacture is as indemnified as possible from any blame), they will wait for a large enough gap, they will ignore faster moving lanes, they will wait for intersections to be clear, they won't speed... So the arsehole will decide that they know how to drive better because they will force their way into traffic, tailgate, so on and so forth.