Firstly we should take into consideration that having an independent judiciary is a relative idea and is therefore heavily subject to perception. While I'm not making a comment on the effectiveness of any particular approach this is still important.
Secondly we should consider who exactly the judiciary is supposed to be independent from, It can't be independent of everyone so this is an important question.
Using England (and perhaps other parts of the UK) as an example. The judiciary is appointed by the queen officially however the appointments are selected by the judicial appointments committee (JAC) which is it's self appointed by the Lord chancellor (who is a member of the cabinet) who may accept or reject candidates proposed by JAC hence there is a democratic check of sorts.
As you can see the appointments are relatively independent. However, they only remain so providing that the majority of JAC and the lord chancellor allow it to be even with his somewhat limited power the lord chancellor could appoint JAC member that align with his views and hence judges would then be more likely to align with his views. This could be said to be a democratic mechanism of sorts.
The point I'm making here is that appointments can only be independent up to a point and only if those making the appointments wish it to be. Too many democratic checks can also risk the judiciary losing some independence.
Additionally prior to 2005 judges were recommended to the Queen directly by the lord chancellor hence independence was somewhat limited.
There are many other options most of which are either dependent on a government body/Representative or the electorate including:
- An elected committee to appoint judges - not sure if this happen anywhere currently
- Elected judges with or without partisan system - various US states 1
- Appointment by officials (e.g. governors) - various US states 1
- Assisted appointment a board/committee assists the appointer - various US states 1
- Appointment by committee this is rather vague but the committee could consist of anyone
- Appointment by other judges
As you can see none of these approaches make the judiciary entirely independent they simply displace the dependency from one place to another. Although you have said that election will not produce an independent judiciary it might disperse the dependency the most and hence produce the most independent judiciary. Anything more independent than this and your potentially looking at internal appointment systems but this simply makes the judiciary dependent on itself which could have other issues e.g. lack of transparency, internal political self serving.
TL;DR: there are many different potential approaches to judicial appointments but only so much independence can be achieved before it is simply depending on another entity/person/the electorate and democratic check are at risk of eroding Independence.