Anne Boleyn convinced Henry VIII to shun the Pope and the Catholic faith and become head of his own religion, the Church of England. I imagine Margaery's plan would have been to get her brother safely back to Highgarden, convince King Tommen to assume control of the faith and then send the Tyrell army in to deal with the militants. The High Sparrow would have been finished either way, she would have definitely double crossed him.
Margaery's story echoed a combination of Catherine of Aragon with Anne Boleyn. Catherine married Prince Arthur, who died, so she then married the brother, Prince Henry and became Queen regardless when he was put on the throne. Margaery did the same with Joffrey and Tommen. Anne and her brother George Boleyn were arrested for multiple reasons, two being incest and high treason. George was supposedly also accused of being gay, like Ser Loras.
Was anyone else reminded of Richard III when Cersei took the Iron Throne? With the young king Edward V dead and no line of succession the crown fell back to his uncle, Richard. With Tommen dead and no heir, it fell back to his mother (although she has no bloodclaim). Neither Richard III nor Cersei have good reputations and considering neither have heirs to follow their reign, they don't appear to have a long term goal about succession. It was never clear who Richard wanted to follow him, and I doubt Cersei knows who will follow her. It's the selfishness and 'living in the now' short term attitude they both have which is their downfalls.
Margaery planned ahead and plotted out the game before she played it. Unfortunately for her, a thoroughly planned scheme can fall to pieces when the other players take instant action and don't have patience to play.
Cersei made up the rules as she went, which made her unpredictable and wild and incompatible with Margaery.
Margaery moved a chess pawn having already worked out how to checkmate the King. Cersei doesn't play chess; Cersei knocks the table over and kills the other player.