One method that I've heard of is to have a committee (/"commission"/"council") select judges. The committee composition can draw from multiple branches of government (e.g. some members are existing judges and others are appointed/elected by the executive and/or legislative branches) and from civil society (e.g. appointed/elected by bar associations; in some implementations a majority of the committee is from civil society). The terms of members of the committee can be staggered.
The idea is to make it difficult for any one controversial person or party or movement to consistently dominate the committee, because in order to do so they would need to consistently dominate multiple branches of government and civil society (because the different members of the committee are selected by these different institutions) over a long period of time (because of the staggered terms).
You might lose some expertise, but on the other hand, you don't have the tragic spectacle of Justices dieing in office whilst waiting for a 'safe' time to retire.
Taking again Germany as my example, since I know it best: There are 16 judges with a period of 12 years. Adding the age limit and other reasons that averages to about 2 elections per year. Thus a bit more than 4 years till a new group can take over the majority. (Now they are elected alternating by the different chambers of parliament, where one of the chambers, Bundesrat, is also slower moving in replacement ... making it hard for a short term movement to take over control and if, impact is relatively short - unless they stay in power long enough to replace all.
Let them serve for a limited period of time, say 16 years max. Can't be removed before then. It's not that complicated and would prevent justices who literally sit on the bench until the day they die.
I think Germany got that better: here we have a 12 year term (thus a single government can't easily swap them out - a learning from the time of 1933) and a max age of 68 (for whatever reason that was picked)
If that were the case, and justices' terms started in January of even years (to avoid the election cycle), we would currently have 2 Trump appointees, 4 Obama appointees, and 3 Bush appointees, roughly matching what the balance of the court would be next month if Ginsburg had died 3 months later.
- Have a public vote, direct legitimation (or via some extra electoral college or something) this means that judges have to be "popular" and run campaigns and question is, if that's really smart ...
- Have the "juristical class" elect within, so judges from lower courts would lick somebody, or current judges elect additional ones. That would put judges into their own "class" and remove all democratic legitimation
- or do what is done and have a democratically elected body do it. In the case of the U.S. it's done by a combination of president (nominating) and Senate (confirming) where the Senate represents the different states.
It is one of the tough problems.
For the pardon the idea comes from absolutist times where a King would pardon as he likes. The modern interpretation comes from correcting "blind" justice. Justice has to rule according to law. But sometimes one either might decide that a law was bad and than a pardon might be a way to correct that (ideally if law is rewritten as well) and sometimes there are hard cases, like the 90 year old who should get a chance to die outside of prison, for sake of family etc.
Generally the system assumes the actors act mostly in good faith and were removed (impeachment etc.) otherwise.