It used to be an election dependent on bribes. But eventually Austria just kept winning it forever and it seemingly was just hereditary. When did this happen? Why?
I've written previously here about how the Habsburg's maintained their streak of electoral victories for the Imperial title. To summarise, the election of the next Holy Roman Empire was never a purely Habsburg affair. However, as likely the single most powerful prince of the Empire, the Habsburgs regularly represented one of the best potential candidates for Emperor, and thus were able to regularly secure their re-election. Similarly, working to secure the election of their successor was usually a centerpiece of policy for Habsburg emperors, and electing an heir would thus involve a considerable period of negotiation and haggling with the electors.