So I understand that the way to get a true name of a demon is to charm it, such as with Charm Monster unless you find an ancient scroll. My DM rules that you can't command it to tell you it's true name because it isn't charmed (seems this is controversial, with a ton of people on both sides and thus up to the DM; seems fun to me either way).
With Summon Greater Demon, say you summon that demon again later but it runs out of hp, it would go back to the abyss, letting you summon it again later. If you cast it before a long rest, it would have the hp it previously had when it despawned because it is the same demon if before a long rest as a creature. This makes it seem like the downside of summoning a demon you know the name of is that the hp may be depleted. Does this sound right?
I've seen some answers though say you cannot even summon a specific demon. This idea is supported by the wording in Infernal Calling, where it says you summon that devil if you have its talisman with no such similar wording in Summon Greater Demon. So if these spells are read in light of each other, it seems pretty ridiculous to have to use two spells to get one demons name for one casting of the spell (SGD and Charm Monster). Or maybe not to some DMs?
Also, with the variant rule for summoning another demon at a percentage chance by the demon type, is that for the player too, the DM only, or the discretion of the DM? Seems like if you wanted to call in a demon for mass destruction, the first command would be for it to call its friend too.
Last, it seems that SGD just attacks what is closest if you lose control, ostensibly reducing risk of using it if you are smart about placement. It seems like a lot of DMs ignore this and make up an anthropomorphized story of how it didn't like being controlled and will then beeline to the summoner. Is this correct? I'm relatively new to D&D, and a lot of these rules seem poorly explained and up to interpretation or based on previous editions I haven't played.
Best Answer
You are confusing rulings with rules
Most of what you ask about is how individual people rule when playing the game. However, that is not the rules, other than the rules telling you that the DM can ignore them or interpret them if they prefer. The rules are what is written in the rulebooks. Let's take a look at that.
Summon Greater Demon says:
There is no language in the spell about any way to summon a specific demon. You select a type of demon to summon, and get one of that type. Using the principle that spells do what they say they do, and not something else, the spell does not allow you to summon a specific entity in the way gate does.
The spell further says:
There again is nothing in here about the demon needing to be charmed to follow your commands. As long as it has not broken free of your control, it must do what you tell it. That can include you telling it to share its True Name with you. Whatever your DM does is their ruling, but it's not the default behavior as given in the rules.
So if you chose to ask for its true name, you can use true name, but only to say it and make it harder for the demon to break free from your control. If it does so, it will attack the nearest non-demon, not the caster, so careful placement can indeed mitigate the downside of that in combat.
It may be this section is causing the confusion — do you really have ask and then say its true name, rather than obtaining the true name of a demon, and the use it to summon that specific demon? Does an intelligent demon who remembers you summoned it against its will really mindlessly attack the nearest non-demon, instead of getting payback? Unfortunately yes, that is what the spell says, and that is likely why many DMs opt to overrule it.
So most of your question is based on how people home-rule the spell to behave differently, and that's all fine but if you want to know how it then works, the answer can only be: ask your DM.
What happens if you re-summon a specific demon that was slain?
That said, what if you can summon a specific demon, say with gate, and it dies?
The lore text for demons in the MM says:
While no detail is given of what happens to the demon's hp when it is destroyed and reforms in the abyss, if its hp would stay at zero, it would then die in the Abyss too, and if that happens, would be truly destroyed. So that cannot be the case. I think the simplest assumption is that it reforms there at full hp, and if you re-summon it, will be at full hp, too. (The somewhat oblique "its mind and essence intact" seems to support this if you read essence as its physical aspects.)
Lastly, what happens if you truly destroy a specific demon, and then use its true name to summon it? Logically, nothing happens. That demon is no more, so you cannot summon it.