The prosecutor at the trial of four men said the 39 migrants -- including two boys aged 15 -- may have died because "greedy" people-smugglers attempted to carry out two lorryloads in one, after a previous one was intercepted by authorities.
The migrants' bodies were found in the container in Essex, southeast England, last October 23 after it had been transported on a cargo ship from Zeebrugge in Belgium.
The container had docked in the port of Purfleet just after midnight, and the Vietnamese passengers had been sealed inside in the dark for at least 12 hours, in unbearably high temperatures.
A forensic expert calculated it would have taken about nine hours for the air to turn toxic in the trailer, with death coming soon after.
Prosecutors have said the trapped Vietnamese were unable to get a phone signal inside the container, whose cooling system was turned off.
Around 7:00 pm, about five hours before the truck reached Purfleet, Nguyen Dinh Luong, 20, tried and failed to call the Vietnamese emergency line of 133.
At 7:37 pm, Nguyen Tho Tuan, 25, recorded a message in Vietnamese for his wife and children.
"It's Tuan. I am sorry. I cannot take care of you. I am sorry. I am sorry. I cannot breathe," he said. "I want to come back to my family. Have a good life."
In another video message at 8:02 pm, a different voice could be heard saying: "I can't breathe. I can't breathe. I'm sorry. I have to go now." In a second message, the same voice added: "It's all my fault."
Prosecutor Bill Emlyn Jones said that haulage company boss Ronan Hughes had, via a Snapchat message, instructed lorry driver Maurice Robinson to "give them air quickly but don't let them out" once he picked up the container in Purfleet.
Security camera footage showed Robinson park the lorry after leaving the port, walk to the rear and open the door slightly.
He took a step back and stood for 90 seconds before walking slowly back to his cab, the jurors heard. First he called Hughes, then the UK emergency line 999 to report the deaths.
Robinson and Hughes have pleaded guilty to manslaughter and to conspiring in people-smuggling.
Eamonn Harrison, 23, who is said to have driven the lorry to Zeebrugge, and Georghe Nica, 43, both deny 39 counts of manslaughter.
Harrison, Valentin Calota, 37, and Christopher Kennedy, 24, have pleaded not guilty to being part of a people-smuggling conspiracy. But Nica has admitted the charge.
The trial began on Wednesday and is expected to last up to six weeks. - AFP