Judge Sunita Mahtabfar, presiding over the El Paso immigration court in south-west Texas, kicked off the hearing by asking the 16 asylum seekers a question.

“Is anyone here afraid to return to Mexico?” she said.

There was a chorus of “Sí”, at least from the adults. Three of the four children in court dozed, slumped against their parents on the unforgiving wooden benches. They had been up for hours, having been summoned to a meeting point in Juárez at 4.30am.

One five-year-old boy was lying on the carpet floor, softly singing as he played with a plastic water bottle.

“Let me ask it a different way,” Mahtabfar said. “If anyone here is not afraid to return to Mexico, please raise your hand.”

No hands were raised.

Most of the 16 people in court had made the long, frequently dangerous, journey from their homes in Central America, hoping to live in the United States.

But upon arriving at the US-Mexico border, and attempting to apply for asylum, they had instead been ordered back across the Rio Grande River that forms the border here, to Juárez – one of the most dangerous cities in the world.

A migrant from El Salvador shows her documents from Migrant Protection Protocols on 16 June. Photograph: Paul Ratje/AFP/Getty Images

This was the first hearing in a months-long process to determine whether they will be granted asylum in the US. It got off to an inauspicious start. The court’s computer system was experiencing difficulties. After changing out the desktop computer at the judge’s desk three times, the hearing was eventually switched to a different room.

It was 10.30am, two hours behind schedule, before the session began. While they waited for a working computer, the people in court were kept under heavy security. To use the bathroom, each was escorted by security guards, there and back. They would be returned to Juárez immediately after the hearing.

Their exile to wait in limbo in Mexico is the result of the Trump administration’s controversial Remain in Mexico, or Migrant Protection Protocols policy, which has turned back tens of thousands of women, men and children since being introduced in March.

With little money, these asylum seekers are forced to live in shelters, in abandoned properties or sometimes on the streets just south of the US border, in cities where immigrants have been sexually assaulted, kidnapped and murdered.

On 17 July those in the court, a small, windowless room on the seventh floor of an austere building in downtown El Paso, were well aware of the danger in Juárez. Many were terrified of returning.

One 24-year-old woman, wearing a grey T-shirt with her dark hair pulled back into a ponytail, sobbed as she pleaded with the judge to let her stay in the US. She was living in Juárez on her own, she said, and a group of men had been following her in recent days.

She said she was aware that she was not meant to enter the US without permission, and had intended to wait in Juárez until she was allowed to enter.

“But when I went to work at 8am in the morning there were some people following me,” she said.

“So I turned myself in at the bridge.”

Another woman, a 26-year-old from Cuba, had tried to enter the US on 4 May, but had been sent back to Juárez. She, too, was in tears as she told the judge she was in danger in Mexico.

“I just wanted to tell you I have an affidavit from my family, who are American citizens,” she said through the court translator.

“I am over here by myself in Mexico, and it is quite hard for me to be here by myself.”

Under Remain in Mexico, the judge told her: “Unfortunately that is not possible.” Both women were told they could have “credible fear” interviews – essentially where a government official gauges how much danger they would be in if they returned to Mexico – but there were no guarantees. The interviews are not open to the press.

The Guardian spent two days attending the El Paso federal immigration court, gaining an insight into the fear, confusion and, in some cases, incompetence, that the Trump administration’s immigration policies have led to on the US-Mexico border.

Despite the well-documented, appalling conditions in some government detention centers north of the border, there was a stream of people pleading to taken into US custody. One woman, María, said she was afraid to return to Juárez. Two men had been killed two blocks away from where she was staying. A Cuban man said five of his countrymen had been kidnapped in recent weeks.

Members of the Mexican national guard patrol the banks of the Rio Bravo in Ciudad Juárez. Photograph: Hérika Martínez/AFP/Getty Images

But some of the most harrowing stories coming to light were of the people who had not made it to court.

On Wednesday, the attorney for a 19-year-old Honduran told Judge Nathan Herbert that the teenager was unable to make her court date because she had gone missing.

The woman had attended court for her preliminary hearing on 22 May. She had told the judge she was afraid to return to Juárez, and was granted a credible fear interview. She was deemed not to be in danger, and was sent back to Mexico, with instructions to reappear in court in July.

The 19-year-old has not been seen or heard from since.

“The last contact was 22 May,” immigration attorney John Moore said in court.

Moore said the day she returned to Mexico was the last day she used WhatsApp, her primary mode of communication, and she never returned to the shelter where she had been staying. Despite hiring a private investigator, Moore had been unable to contact the sponsor the teenager had named in the US, or her family.

The judge heard all this on Wednesday afternoon, then tried the 19-year-old’s case in absentia anyway. She was refused entry to the US. Her bid for asylum was denied.

A view of the Richard C White federal building in El Paso, Texas, where immigration court hearings take place. Photograph: Paul Ratje/AFP/Getty Images

In El Paso, where thousands of migrants have arrived in the past few months, few are able to find lawyers amid the chaos.

Instead, many attempt to represent themselves – an almost impossible task, given that asylum application papers are legal documents that have to be filed in English, with supporting evidence also translated into English by a certified translator.

Until recently, immigration advocates were allowed to speak to asylum seekers in court, before their cases are heard. They could explain what the hearing would entail – many migrants believe that on their first day in court they might be admitted to the US immediately, when in reality it is a months-long, arcane process – and advise them of their rights.

But in an example of the on-the-hoof policy introduced in courts, that was abruptly stopped on 24 June.

“All these people are at imminent risk of danger and I could be helping them with that, for free,” said Taylor Levy, an immigration lawyer who was in court on Tuesday, and has previously represented immigrants in El Paso pro-bono.

Levy said she was given no prior warning by court officials that she would no longer be able to talk to asylum seekers, until the day it happened.

A week later, she was told she could no longer give out coloring books and crayons, something she had been doing for months to help occupy children while their parents pleaded their cases during the long hearings in court.

We already spent one month in Mexico. We haven’t been able to sleep for two nights Darwin

Adam Serwer, a staff writer for the Atlantic, coined the phrase “the cruelty is the point” to describe Donald Trump’s approach to politics. The term was swiftly picked up and applied, in particular, to the government’s approach to immigrants: the children in cages, the people crammed in dirty shelters or border detention. And the asylum seekers who have terrifying stories of violence and exploitation in their home countries, then are turned around and sent to wait in fear in Mexico. It was deliberate, some have argued, designed to stop people seeking asylum in the US.

There is evidence that the practice might be working.

On the Tuesday afternoon, a 30-year-old Honduran man named Darwin sat at the front of the court with his 10-year-old son, Christopher. They had crossed the Rio Grande, at El Paso, on 7 June. He was hoping for a better life, looking “to work, and for him to study”, Darwin said, gesturing towards Christopher.

Both looked exhausted, red-eyed and dishevelled. Christopher seemed to be crying as his father spoke, to tell the judge that he had changed his mind about entering the US.

“We already spent one month in Mexico,” Darwin said, through the court interpreter.

“We haven’t been able to sleep for two nights. Look at him, and look at me.”

The judge told Darwin that he and Christopher would be taken into custody, and flown back to Honduras. Despite the gang violence and unemployment that has caused thousands of people to flee their country, both father and son looked relieved to be returning home – at least to bring their ordeal at the US border to an end.

Perhaps the cruelty really is the point.