I doubt the carts themselves are the main revenue concern (although they certainly help) for municipal courses -- it's that too many players wouldn't play at all without golf carts.
There are a lot of people who won't even play if it's carts on path.
That's my line of thinking. If a muni charges something like $40 with a cart, would removing the cart from the course reduce rounds played to the point that each round would need to be bumped to $60 or even $80 a round to cover the loss?
I know it's a cash flow concern in the Bay Area. SF leases it's muni courses to operators, and that's caused some issues with carts. Gleneagles SF, for example, has 5 (?) carts I think. You're expected to walk, but if you have a need, they'll give you a cart. The reason is that the lease holder is on the short end of the lease, and it's worth investing in new carts.
I also believe this is the case at Sharp Park, where last time I checked, they still use the gas-engine carts that are on their last legs.
The relationship between the municipality and the course will matter a lot in things like this.