Also, at what point could the emperor be considered to have virtually no power? The Treaty of Westphalia? The reformation?
I would argue that the emperor lost power only after the dissolution of the empire. After all, if it was truly just a ceremonial position then it wouldn't have been dissolved, and the precedent of the Habsburgs being the imperial family managed to unite a fairly large, very ethnically diverse empire for another hundred or so years.