I believe there's very little deus ex machina. The main point is that Voldemort delved too greedily into dark magic, weakening himself very much, while Lily's love magic was pure and protected her son against Voldemort's evil magic. This is why Harry can see into his mind and why he manages amazing feats like Gringotts or escape at Godric's Hollow, because Voldemort's hubris handed Harry the tools. It's all explained in the chapter "King's Cross", re-read that chapter and you'll gain fresh clarity.
JKR does introduce new concepts and history unknown previously to Harry, but name a book she doesn't do that. She'd be raked over the coals if she didn't offer anything new in one of her longest of the seven books. She needed the Deathly Hallows as a new mystery, a new suspense that creates tension throughout the book, pulling you onwards and competing for the horcruxes. It also highlights Harry's temptation to attain that which Dumbledore sought, but ultimately Harry chose the wiser path than Albus.
The other new concept was wand lore, which was not very fleshed out before DH. I don't love that wand lore dictated the final duel so heavily, why does Harry have to win based on overpowering a 3rd wizard, the wand truly knows that? Why not just have Harry's courageous, love-inspired magic overcome Voldemorts? It's kind of a letdown that Harry beats Voldy because he took 3 wands from Draco's hand...
Other than these two concepts, I don't see anything new and cheap like a deus ex machina. That term would literally mean that Harry is defeated by Voldemort in the end (he never was), only to be saved by a God at the last minute (he never was). Harry won on his and his allies' courage, and Voldemort lost due to his own hubris and his own determination to focus on wands and to tell all his servants not to kill Harry.