From the way that Targaryen succession seems to have worked following the Great Council of 101 AC and the aftermath of the Dance of the Dragons, yes Robert is the legal heir to House Targaryen after the death of Viserys, although Dany would inherit before Edric Storm and probably before Shireen (although that’s something of a tiebreaker scenario).
Having Stannis or Renly marry Rhaenys would potentially cause a succession crisis: who inherits after Robert, Robert’s kid or Renly/Stannis’ kid w/Rhaenys?