Had Rudolf Hess not taken his flight or failed Hitler, would he be the legal heir as Deputy Führer?
Per Hitler's Reichstag declaration on 1 September 1939, his heir was Göring. This was affirmed by by a decree in 1941. If something happened to Hitler
and Göring, Hess would be the next in line. His Deputy Führer title didn't make him the equivalent of a Vice President, it just referred to Party matters (though his office also had the authority to vet civil service apppointments and government legislation). Worth noting is that the Gauleiters continued to regard themselves as being responsible only to Hitler (even Bormann, a man far cannier and brutal than Hess, wasn't able to get them all to dance to his tune, though he was successful at replacing some who crossed him).
So...if Hess doesn't fly to Britain, Germany wins and then Hitler and Göring die...then
theoretically Hess is the heir. However, Hess is a weirdo who's bad at power politics, annoys the Party elite and who has spent his career just acting as a mouthpiece. He could never be Führer (in the sense of being the actual ruler and not just having a title), only a stooge for someone else, unless he just gets shot or locked up.
As for what happened to Göring in 1945, Resurgam is correct. Göring worded his telegram very carefully because he was rightly nervous about Bormann pouncing on it. And that's what happened. Hitler at first reacted with indifference to the telegram, despite Bormann trying to present it in the worst light. But then he learned that Göring had sent telegrams to other Nazi officials, in which he said that Hitler's testament had been invoked. Apparently that's what threw Hitler into the rage we see in Downfall (the movie simplifies things a bit, which is fair), with ample encouragement from Bormann and Goebbels.
Then Hitler sent a telegram to Göring accusing him of treason and demanded that he resign from all his offices. However, then Bormann ordered the SS to arrest Göring. Contrary to Downfall, Hitler didn't order Göring to be shot if he didn't survive the Battle of Berlin.
Rosenberg, as already mentioned by others, is irrelevant. If Hitler and the inner circle all die off, you've...got a bunch of Nazi Gauleiters (e.g.
Erich Koch and
Arthur Greiser and
Karl Kaufmann), Higher SS and Police Leaders (HSSPF - basically Himmler's local deputies, very underexplored figures in fiction and AH even though many of them played a pivotal role in Nazi atrocities. Examples would be
Erich von dem Bach-Zelewski and
Friedrich Jeckeln), Wehrmacht officers, Reichsleiters (well, the main ones are dead, but yeah) etc. Things get...bloody and chaotic.
Nazi Germany has no mechanisms to enact a peaceful transfer of power in such a situation (hell, I doubt you'd even get one if the inner circle hasn't died. Hitler was what kept this highly toxic, murderous gang together). The Nazi Party doesn't even have a Politburo or Central Committee equivalent. Hell, the OTL Reich Cabinet under Hitler had its last meeting in 1938. Yes, Hitler never convened the cabinet during the war.