Donald Trump has pledged to “drain the swamp,” but I wonder if he knows just how deep down the muck goes.

Yes, he plans to close the revolving door between his administration and the lobbying firms of K Street, and that’s a good start. If you don’t do that, a top federal official is going to be paying way too much attention to the lobbying firm he expects will hire him after he leaves government, and that’s a legalized form of bribery.

President Obama made a similar pledge, and as quickly backed away from it. He said that no administration official could leave government to take up a job as a lobbyist, but exemptions were given and end runs permitted until there was little left of the pledge. Trump proposes to up the ante, by extending the ban from Obama’s two years to five years. He’d also close some of the loopholes that permitted Obama officials to work in lobbying firms without registering as lobbyists.

We need to go further, however, and extend the ban to congressmen and their staffers.

About a third of the current former congressmen and senior staffers work in corporate government relations departments or as registered lobbyists, where they trade their government contacts in return for huge salary increases.

The muck goes deeper, however, as I discovered in my own little battle with the bicycle mob of Alexandria, Va. The federal government offers states and local governments about $900 million a year for bicycle and pedestrian improvements, and a fair chunk of this goes for bicycle lanes and subventions for the Capital Bikeshare program, with its rental stations of red bicycles. With the feds providing as much as 90 percent of the money for some programs, it’s hard for a city to turn this down.

In my case, the bicycle lanes were going to run down a very steep highway that saw 14,000 cars and large trucks pass by each day. As safe alternate routes were available, it seemed the height of craziness, but what it had going for it was an energized lycra-clad lobby group that had the ear of the city government. When not actually bicycling, members of the group seemed to live for meetings at city hall that ran for six or more hours, often past midnight. They had their votes, their hatred of cars — and more importantly, they had federal money on their side.

The federal grant to the bicyclists had done three things. Through the bicyclists’ message (from “Cabaret”) that “tomorrow belongs to us,” it might have gotten some people on bikes for the first time. Second, by taking away two-lane streets for bike lanes and parking spots for bicycle stations, it had done its bit to ban fossil fuels and save the planet.

Third, it had created a local, progressive interest group and given them an in with city hall. And for the federal regulators who designed the programs, that was perhaps the most important thing of all.

The bike program isn’t a big deal in itself. But littered throughout the federal government are scores of similar programs, aimed at empowering the community organizer, the village radical, the smarmy city councilman. And that’s what the new administration has to take on.

You’ll see it in Education Department mandates, Energy Department programs and Transportation Department directives. You’ll see it in the half-billion dollars Planned Parenthood receives in government funds, which makes it easier for it to shift money in political contributions to Democrats.

What’s going to be needed are Trump appointees who are informed enough to know which programs are boondoggles for Democrats and who, moreover, are tough enough to zero them out. Right now all the think-tank opportunists, the well-bred lawyers, the mild young men in the Republican Party are sending in their resumes to the administration. Will people so skilled at the art of pleasing have the requisite grit?

F.H. Buckley teaches law at George Mason University. His most recent book is “The Way Back: Restoring the Promise of America.”