By only doing projects for which there is sufficient political support across the board, not the ones that are supported by a tiny vocal minority of the electorate.
Either we live in a democracy or we do not. Democracy determines the correct path by wobbling between two incompatible options - implementation and repeal. That which is implemented by one side, but not repealed by the other survives as the appropriate path.
There is no alternative to this - without abandoning democracy and universal suffrage.
Remember that democracy is the worst way to run a country, except for all the other.