I've never looked into this but I have a gut feeling that, for Apple Maps and Google Maps, they rely on a mechanism that is less battery intensive (and not exposed with an API) than what a third party app would have to do.
It's exposed with an API. Google Maps is a third party on iOS but still can do the same timeline tracking all day even when it's not open, if you have it enabled.
The higher-resolution frequency surely comes from people who have Google Maps open while they drive, for directions.
Also, slow traffic is slow. If you're stuck in gridlock, even if your location only updates once every 5 minutes, that might just be 5 blocks. Average that across a quarter of all vehicles and that should be plenty of data for block-level traffic estimation.