The best method of insuring that is charging developers impact fees, which are then used to perform the upgrades you describe. Impact fees are also the primary target of the very weathy and powerful realty lobby groups -- they will spend hundreds of thousands of dollars on political campaigns to elect people who will then save them tens of thousands of dollars by removing impact fees. If you ever wonder why most city councils are composed of developers, this is why.
This works when the developers are doing large redevelopments - it works great in suburbs where the developers are converting farmland, for example, because the total number of projects is low.
But when the "developers" are people replacing single-family homes with duplexes, etc, it gets harder to manage.