In the Middle Ages just about every Emperor tried to strengthen the cities. This didnt quite work out, time and time again, so Im a bit sceptical about that.
I think that's because the cities were too few and too weak. If there had been earlier urbanization throughout the Empire, resulting in many more imperial cities which may have had more time consolidating their local power over surrounding areas it might have worked. After all, a 10th century emperor just didn't have that much cities north of the Alpes to strengthen, right?
And what about those "peasant republics" like the Swiss? Couldn't there be more of them? So much of them that they become a player to reckon with - or at least so much of them that they keep local nobles in check?
Considering a hereditary emperor - that could work. We had, however, semi-hereditary emperors IOTL as well. After all, a strong emperor with a son typically had him made king. The problem is that a strong emperor AND a surviving son of proper age were always required. But a series of strong Emperors would probably be required initially in case of a hereditary title as well. And a son of proper age would be required as well even if the monarchy were hereditary. I personally think that if the early imperial dynasties were anywhere that long-lived as the French (or the Welfs, which, in that regard, would make a good imperial dynasty), that could have led to a more centralized HRE without making it officially hereditary. Though a hereditary monarchy would still help.
The main proble, IMHO though, is the pope and the church. The emperor had to deal with both much more than the kings of France or England. Even if you had a hereditary monarchy, the pope might excommunicate the Emperor, its son or both and crown a counter-emperor. And since the HRE held power in Northern Italy, the pope will frequently try exactly that.