She was put under "relentless pressure" by her employers to confirm outlandish allegations against former Boyzone singer Mark Walton, Kouider's ex-boyfriend.
Prosecutor Richard Horwell QC said a witness, who cannot be identified, had described how she was tortured in the bath at the couple's home.
Lionnet was heard to scream and splash in the bathroom as the defendants told her to "breathe", he said.
In September last year, neighbours alerted the fire brigade after spotting a fire in the defendants' back garden. There was a separate barbecue with some chicken on it nearby, the court heard.
Horwell said: "The fire was put out and then the burnt debris was turned over with a spade to ensure that the fire had been fully extinguished. As the ash was turned, the remains of Sophie started to appear.
"Medouni was asked what it was and he replied 'it's a sheep' which he said he had bought from Wimbledon market."
Earlier, jurors heard Kouider had become obsessed with the false idea Lionnet was in league with Walton.
Horwell played snippets of more than eight hours of mobile phone recordings of the defendants' interrogations.
Lionnet's mother wept and fled the court as Kouider was heard shouting at her daughter in a mixture of French and English.
On 11 September, Kouider screamed at her nanny: "You destroy everything. I was trying to find myself again. I pray to god not to make me touch you. I don't want to make my hands dirty."
Horwell said the couple got her to admit to the false allegation that Walton had come to the house, drugged and sexually abused the occupants.
He added: "When Mark Walton came to the house and sexually abused everyone in it, they became obsessed he must have been with somebody else."
Jurors were shown video footage of an emaciated and gaunt looking Lionnet making a so-called confession hours before she died.
Horwell: "You will have seen the state of Sophie when she uttered the words that can be heard on that video clip and whatever may be said about that final confession it is anything but voluntary.
"Sophie had been subjected to violence and a relentless inquisition. Those are her very last words. Within hours, Sophie's life was taken from her."
The defendants, who are both French nationals, deny murder but have admitted perverting the course of justice by burning the body.
The court heard Medouni had claimed Lionnet died by accident in the bath while he interrogated her. Meanwhile, Kouider said in her defence statement that the nanny died while she was asleep.
Then days before the trial, Medouni served a second defence statement saying what he said before was untrue and designed to protect Kouider. He now claims he was woken by Kouider and found Lionnet in the bath.
The trial is due to continue tomorrow.
This article originally appeared on the Daily Telegraph.