Technically, the next in line after Tommen/Myrcella could be Cersei.
With the two kids theoretically out the way, it would pass to Stannis...but his rebellion obviously discredits him and his family in the eyes of the crown. Due to the fact that Stannis had a Targaryen grandmother, this would then make Daenerys or Aegon the rightful heir...but again both are technically rebellious against the crown, so would not be credited and would be disqualified.
After this, the crown would surely pass to the family with the strong connection to the previous monarch. Considering Tommen/Myrcella are (legally) half Lannister, the crown would then pass to the Lannisters. Tywin is dead, though, which means the throne would pass to Jaime. With Jaime being LC of the Kingsguard, the throne would pass to Tyrion...who is disqualified on the basis of murdering a previous King. The crown would then pass to Cersei...but even if it only hypothetically goes to men, Kevan who is next in line is dead, and Lancel is with the Faith Militant.
So, yeah, Cersei is (legally) the heir to the throne if her kids die. I think. Which would be ironic. She desperately wants to rule...and could do so legally, but would lose her children in the process.
Well, all she needs to do is for the rule to bypass: Stannis, Shireen, Jaime and Tyrion (assuming that Lannisters have the best claim after Baratheons, which I am not sure that it is the case). Obviously, she might find a way of doing so (and the prophecy needs to be fulfilled), but it is really a weak claim.
I also find quite ironic that Targaryans links should be used, when we have Targaryans who are alive. Robert's move was just to appeal to the fools, he became king cause he won the war (and neither Ned, nor Jon were interested in becoming kings), not because his great-grandmother was Targ.
What might be for Cersei more problematic than her links, is that Tyrells are in the verge of rebellion, and they won't accept any deal which doesn't have Maergary as queen. They are also significantly stronger than Lannisters, let alone Lannisters commander by a disinterested Jaime (maybe even a dead Jaime) a few thousands km away. Aegon on that aspect might save her, cause Tyrells have a centuries antagonism with Martells. Interesting to see what Littlefinger does. He probably won't join forces with Jon, and definitely no with Aegon (because of Varys links), so he could make an another alliance with Cersei. Or probably go after Riverlands considering that Freys won't be that strong when their Lannister-Bolton alliance get destroyed for obvious reasons (Lannisters go to KL, Boltons get massacred by Jon).
And of course, we have the Greyjoys who could easily defeat anyone in the water, and destroy Lannisport within a day.
I guess that she will be a self declared queen who will control only Kingslanding and Crownterritories, with all other parts being in a deep civil war, which will prepare a nice situation for Daenerys move, and obviously set the stage for the Others invasion.