We who follow immigration policy closely know that the wall is a dumb idea. Closing much of the government over it is dumber still.

Why is the wall a dumb idea? It would be expensive. It’d be unsightly. It’d be environmentally destructive. More to this point, it’d be ineffective.

First off, an estimated 40 percent of those here illegally arrived as tourists, as students or on other business but have overstayed their visas. A physical wall would have no impact on people like them.

Secondly, foreigners with thousands to pay smugglers to get them into the United States will find a way. In any case, a wall spanning the border with Mexico — be it stone-age or iron-age — would be a primitive response in the era of electronic surveillance.

But why does closing much of the government make immigration enforcement harder? Because the shutdown has frozen the E-Verify program. E-Verify is a web-based system that lets employers quickly check whether a new hire may legally work in this country.

The vast majority of foreigners entering this country come for jobs. Turn off the jobs magnet for those without the proper papers and their numbers would shrink radically. That makes an E-Verify-type program the most serious means of curbing illegal immigration.

Thing is, use of E-Verify is generally voluntary in all but a few states. So why don’t President Trump and other wall-obsessed Republicans demand that all employers use it? Excellent question.

And note that they rarely even mention it. The reason is pretty obvious. They have no problem rounding up — and often roughing up — poor Central Americans trying to enter illegally. Inconveniencing business interests is another matter.

E-Verify addresses both sides of the illegal immigration equation — those seeking the jobs and those giving them. E-Verify would identify the lawbreaking employers, as well.

Presumably, that would include Trump enterprises. The Trump National Golf Club in New Jersey was found to knowingly hire undocumented workers. (It actually took the name of an Ecuadorian food preparer using a fake Social Security number off the list of workers vetted by the Secret Service.)

The eight states that require employers to use E-Verify — Alabama, Arizona, Georgia, Mississippi, North Carolina, South Carolina, Tennessee and Utah — have seen a marked decline in their population of undocumented workers. Republicans in other states have opposed mandating E-Verify because their companies would have to pay their workers more than do their competitors in non-E-Verify states.

Others who oppose making it national cite the low unemployment rate. If lack of workers is the problem, wouldn’t admitting more immigrants legally, raising wages or both be a solution?

Sadly, it’s a lot easier to wink at the employers and frame impoverished foreigners as criminals, throwing in some racial slurs for good measure. Hence, the theatrics at the border.

What would happen if the emphasis on enforcement moved to the workplace, where it belongs? The pressure at the border would ease considerably. Law enforcement could concentrate on dangerous people. And the restored order would enable timely processing of claims for asylum.

Most importantly, the United States would have to develop an intelligent immigration policy. That would mean giving higher priority to foreigners with the skills and education our economy needs — while still making room for poor people arriving with only their brawn and monumental work ethic. We’d have to monitor all groups’ numbers to preserve the wages and benefits of our existing workforce, be it native-born or documented immigrant.

The current policy is pretty pathetic. We have an ugly drama at the border and a partial government shutdown that has deactivated E-Verify, the cleanest immigration enforcement tool we have. Does anyone out there want solutions?