I lived in Zagreb & area, trips further east were very occasional, but we visited the coast regularly. Highways and better roads do help a lot, it's also an observation I've had when living in Poland, where the highway infrastructure has been around for a while, but many people still remember the old roads. You're in a hurry, but the road is bad, so you drive more aggressively, because the bad road & conditions slow you down. But as the roads improve, you get used to getting somewhere in X time consistently and without hassle, so there's no point in driving like crazy. Another friend living in Poland has also observed that a lot of traffic accidents in the past few years involved Ukrainian drivers, which would make sense if their road infrastructure is less developed = they still feel the need to drive more aggressively.
Unfortunately the main highway from Zagreb towards the coast is regularly subject to traffic jams in the summer, which definitely doesn't help. But overall I'd still say it's a radically safer place to drive than Bosnia, I've seen more insane drivers in 2 days there than in ~2 years of Croatia.