The European Union desperately wants to agree on a plan to curb the influx of migrants, possibly by creating vast holding camps in Africa. Donald Trump’s America wants to frighten off migrants from Honduras, Guatemala and El Salvador by locking them up and taking away their children. Neither will work but here’s a canny immigration control strategy that might.

Next month, the tourism bureau for Dahar in Tunisia will begin to advertise the country’s south eastern region to European travellers. The organisation, described by its Swiss government sponsors as the first such body in Tunisia, will sell the troglodyte dwellings seen in Star Wars and the spectacular mountains in The English Patient to the adventurous and the jaded. It will market the Dahar region, on the edge of the Sahara Desert, as a unique, untapped tourist destination. The region has little name recognition, with British and European tourists mostly heading instead for the nearby island of Djerba, with its picturesque whitewashed buildings and the oldest synagogue in Africa.

The most interesting part is that the Swiss government is spending $4m on the initiative and is frank about its motivation. Through an implementing agency, a tourism strategy was developed for the 100km stretch between Tataouine of Star Wars fame and Matmata, the region’s largest troglodyte city, where Luke Skywalker’s home is supposed to exist. The Dahar tourism bureau was formed and dozens of small hotels and B&Bs were helped to improve the facilities they offer and their staff was trained in how to cater to European tastes. Troglodyte structures were fixed up and a marketing budget provided to advertise the region.

“It’s meant to contain illegal immigration,” Olivier Bovet of the Swiss Embassy in Tunis, tells me. “We are interested in creating employment so that Tunisians can envisage a future in this country.”

Melania Trump visits child immigration center in Texas

Clearly Switzerland wants to give Tunisians an incentive to stay home rather than leave for Europe. After the Arab Spring, several thousand Tunisians reportedly turned up in Switzerland, which led Swiss policy planners to hastily create a North Africa Programme and rejig the list of countries to which they gave development aid. And it’s not just Tunisian migration they’re hoping to curb – Tunisia is a key transit country for migrants from across sub-Saharan Africa.

Traditionally, the Swiss supported countries that were rather like them – small, landlocked and mountainous – which is why Nepal, Rwanda and Bolivia for instance received aid. But after the 2011 Arab uprisings, Tunisia and Egypt were added on. In 2014, the Swiss government decided it could best support Tunisia by helping it help itself and the idea of “building a destination” in the geographically unique Dahar area was born.

The Swiss project in Tunisia is exactly the sort of template we need at a time “no entry” signs are going up across much of the rich world, with both asylum-seekers and economic migrants increasingly unwelcome.

Countries that want to discourage immigration need to do more than dehumanise migrants. When Trump says migrants will “infest” the United States, it may play well to his base but such statements are of little practical use. So too the threat by Italy’s far-right interior minister Matteo Salvini to “purify” his country through mass deportations.

It is not enough for countries and regional blocs to do short-term desperate deals to prevent migrants from setting foot on their soil. Europe’s 2015 agreement with Turkey temporarily helped because it stemmed the flow of harried Syrians, but migrants are now using another route, across the Mediterranean rather than the Agean.

Walls similarly will not keep out the uninvited. The US could better use the $25bn Trump wants to spend on a “big beautiful wall” on America’s southern border by investing in the Mexican economy and in governance, security and rule-of-law mechanisms deeper in Central America.

Undocumented immigration across the US-Mexico border Show all 14 1 /14 Undocumented immigration across the US-Mexico border Undocumented immigration across the US-Mexico border Immigrant children, many of whom are separated form their parents, are housed in Texas' tent city Reuters Undocumented immigration across the US-Mexico border A two-year-old Honduran asylum seeker cries as her mother is searched and detained near the US-Mexico border Getty Undocumented immigration across the US-Mexico border Undocumented migrants ride on the top of a freight train referred to as the beast, or La Bestia Getty Undocumented immigration across the US-Mexico border A cage inside a US Customs and Border Protection detention facility in Texas Reuters Undocumented immigration across the US-Mexico border US Border Patrol Academy All new agents must complete a months-long training course at the New Mexico facility before assuming their posts at Border Patrol stations, mostly along the US-Mexico border Getty Undocumented immigration across the US-Mexico border US-Mexico border fence A group of young men walk along the Mexican side of the US-Mexico border fence in a remote area of the Sonoran Desert Getty Undocumented immigration across the US-Mexico border US-Mexico border fence in the US Man looks through US-Mexico border fence into the US in Tijuana, Mexico Getty Undocumented immigration across the US-Mexico border US-Mexico border fence US Border Patrol agent Sal De Leon stands near a section of the US-Mexico border fence while stopping on patrol on in La Joya, Texas Getty Undocumented immigration across the US-Mexico border US Border Patrol Academy US Border Patrol instructor yells at trainees after their initial arrival to the academy Getty Undocumented immigration across the US-Mexico border Memorial service in Guatemala Families attend a memorial service for two boys who were kidnapped and killed in San Juan Sacatepequez, Guatemala. Crime drives emigration from Guatemala to the United States, as families seek refuge from the danger Getty Undocumented immigration across the US-Mexico border Arrests on the border Undocumented immigrants comfort each other after being caught by Border Patrol agents near the US-Mexico border Getty Undocumented immigration across the US-Mexico border Detention holding facility A boy from Honduras watches a movie at a detention facility run by the US Border Patrol Getty Undocumented immigration across the US-Mexico border Mexican farm workers Mexican migrant workers harvest organic parsley at Grant Family Farms in Wellington, Colorado Getty Undocumented immigration across the US-Mexico border Mexican family in Arizona A Mexican immigrant family sits in the living room of their rented home in Tuscon, Arizona. The family that Arizona's new tough immigrant law had created a climate of fear in the immigrant community. Getty

With the number of displaced people worldwide setting new records every year – it was 68.5 million in 2017, according to the UN Refugee Agency’s latest report – migration is not a crisis with a clear start and end point. It is a process, a continuous flow of people seeking refuge from persecution, or chasing dreams of a better life. As a recent paper co-authored by sociologist Hein de Haas of the International Migration Institute of Oxford University says: “Migrants from an increasingly diverse array of non-European-origin countries (are) concentrating in a shrinking pool of prime destination countries.”

The issue is no longer about the deserving and undeserving, refugees versus economic migrants, and mostly there is hardly any distinction anymore in the real or rhetorical treatment meted out to either category.

Practical steps to create jobs in poorer countries are the only real way to prevent the ceaseless flow of migrants towards the opportunities seemingly offered by life in the west.