Anyone who has lived with roommates has personally experienced what economists call externalities. Dirty dishes piling up in the sink, terrible music blasting at 2am, and a strange smell emanating from the door down the hall. These are externalities because your messy roommate only considers their own preferences for cleanliness, not the costs they impose on the rest of the people living there.
I think your argument jumps straight from "governments aren't perfect" to "governments are no better than nothing".
There are various ways that the government is somewhat incentivised. One is by educated voters who care about the long term stuff.
Also, if the externalities within the next 4 years are significant, the government will undertax them. But undertaxed externalities are better than untaxed ones.
This is also a neoreactionary / Hoppean argument against democracy: the claim is that monarchs or sovereign corporations will tend to be better at internalizing temporal externalities than elected officials because they have the same sort of long-term interest as the farmer in your example. While the upsides of democracy greatly outweigh this sort of downside overall, it's still worth thinking about how better mechanism design might incorporate a bit more long-term thinking into an overall democratic structure; consider e.g. Garett Jones' proposal in 10% Less Democracy to "give the bondholders a vote".