No, there's a simpler solution than that: don't let municipalities keep the money from traffic tickets (or any kind of fine). The payments should be made directly to the state's general fund. Take away the profit motive, no more profit based policing.
North Carolina does this. The state constitution actually requires that all fines collected "shall be faithfully appropriated and used exclusively for maintaining free public schools."
I've seen this work to have the desired effect.
The campus police at some of the state universities used to issue all sorts of nuisance parking tickets for things like "parked too close to line". At the time, the universities were keeping the money from the fines. Quite a few years ago, there was a legal case that went to the state supreme court where they ruled that the universities couldn't keep the money. After that, the number of nuisance fines dramatically decreased, even though officials claimed that there was no correlation between these events.