I disagree, we should just make it less attractive. This can happen in a few ways:
improve mass transit, and encourage higher density along transit arteries
make vehicular traffic less convenient by routing it around city centers instead of through - i.e. encourages mass transit use
increase property tax and reduce sales tax - basically encourage using less space and using more services (i.e. rely on the local shop, not your own food storage room)
And so on. The benefits here are varied, such as:
less traffic in city centers
more green space, since the space isn’t occupied by as many SFH
less road maintenance because you need fewer roads
healthier people since using a bicycle or walking would be more convenient than driving
But as you noted, the above gets blocked by NIMBYs. But it is possible, as we can see in the Netherlands, which has largely reduced its vehicular traffic and improved the residential density. It wasn’t always that way, but they made a big push for it and people now don’t want to go back.