The boy's family had hoped for the maximum 60 years behind bars for the 41 separate charges Cunningham and her husband, Andrew Freund Sr, faced between them.
Passing the lesser sentence, Judge Robert Wilbrandt explained that as part of the plea deal, the language describing the murder charges as being "accompanied by exceptionally brutal or heinous behavior indicative of wanton cruelty" had been removed.
On April 18 of last year, the couple called 911 to report that their son was missing.
An investigation into his home found no trace of the boy or of an abduction; however police did find squalid conditions, bags of used syringes, chains and locks on the windows and doors of AJ's room, and a combination lock on his closet.
A forensic search of Freund's cellphone found that someone had Googled "child CPR" on April 15, court documents claim; it also found a picture of a shopping list which included duct tape, plastic gloves, bleach and air freshener.
A search of Cunningham's phone meanwhile unearthed a video which had been shot on March 4: “AJ is seen laying on a bare mattress in a crib in a room I recognized to be his bedroom," Detective Edwin Maldonado of the McHenry County Sheriff’s Office, wrote in an affidavit. "In the video, a female with a voice consistent with JoAnn’s is holding the phone and videotaping. She is berating AJ for urinating on his bed."
The officer said that in the video the child is naked except for bandages around his wrist and hips; he is covered in bruising, Action News Jax reported.
When confronted with this video, police said Freund confessed and showed them the shallow grave where he had buried his son.
He said his wife was responsible for the markings, and that he had suggested the cold shower as a punishment for the boy wetting himself, instead of the beatings she used to administer.
He told police that on the night of April 15, the boy had soiled himself and tried to hide it, so they forced him into the cold shower for 20 minutes before putting him to bed, "cold, wet and naked."
He told police that when they checked on him later, the boy was dead. He put the body in a tub in the basement, before driving to the woods two days later and burying him in a shallow grave.
He eventually led investigators to the burial site; AJ's body was recovered on April 26.
An autopsy determined the boy had died of blunt force trauma to the head. The pattern of small circular abrasions to his central forehead matched a detachable shower head found at the home, as investigators determined he'd been beaten with it while standing under the freezing water the night of his death.
On Friday, Judge Wilbrandt described AJ's death as "a horrible death preceded by a horrible life"; he had spent his first 20 months in foster care, having been born with heroin in his system.
The court was played other recovered recordings of the five-year-old attempting to stand up for himself, telling his mother he didn't want to be part of the family and that he wanted bad people to do things to her so she would leave him alone.
Speaking before sentence was passed, a sobbing Cunningham insisted she would give her life to get her son's back.
"I had the privilege of having AJ as a son," she said, per Northwest Herald. "I love him, I miss him and there’s nothing I wouldn’t do to bring him back. ... Anyone who truly knows me knows how much I love being a mother more than anything in the world. Being a mother defines me. My children gave me a purpose. I miss all of them so much."
"There is a great sorrow in my heart. I will never be able to justify anything nor do I want to," she continued. "I spent the majority of my life on autopilot, hanging on by a thread … I had become a stranger to myself …. nobody will ever understand unless they have walked a mile in my shoes. ... I was mentally unavailable, even to myself."
"I would give my life to have AJ back," she said. "This is something I will never escape from."
But describing the child's death in horrific detail, McHenry County State's Attorney Patrick Kenneally said Cunningham was crying for herself, and not her dead child.
He described her lack of emotion as she reported her child missing to the police, despite already knowing he was dead.
"She had beaten this little boy to the edge of death … locked in his room. He had to endure the bleak process of death all by himself," he said.
"The pain and trauma to AJ’s little body proved too much … mercifully, he died," he added. "5 years old, locked in a room, wet … totally and profoundly alone."
The boy's father, himself a former attorney, has pleaded not guilty to 21 charges, including multiple counts of first-degree murder. He is currently awaiting trial.