Throughout the High Middle Ages and beyond, with some instances in the Early Middle Ages, "election by majority" had some instances of existence, although sparse and not always consistent in time.
The first example we can look at are monasteries and monastic communities after the transposition of the Eastern monastic model formed during the Late Roman Empire, possibly after the VI-VII centuries, a period during which st. Columbanus (540-615), an Irish Benedictine monk, founded several monasteries in Frankia and Lombard Italy, forefront among which were Luxeuil and Bobbio (the latter is now his namesake, as he's known as "st. Columbanus of Bobbio"). The Rule of St. Benedict, at chapter 64, states that the abbott had to be elected either unanimously or by a smaller number of monks, if following a "wiser cryterion". This would have gone on for a long time, possibly bleeding in some other election customs of other forms of association (more on those later).
Center and Northern Italian cities from the XI century onwards, like Milan and Bologna, experienced various degrees of elections by vote, approaching a timid, pale concept of what we might call "democracy". Although their later iterations from the XIII and XIV centuries would have seen a larger partecipation of middle and upper class merchants, craftsmen and bankers to balance or root out urban patricians, in their earlier forms the institution of the "comune" (something akin to the English word "commune") had been set up by bishops ruling said cities to deal with urban government. They had an elective nature as they were ruled by public magistrates named "consuls" willingly, with a variable number between two and twelve, with administrative and judicial prerogatives and drawn by the city's urban aristocracy with emphasis towards the notaries and judges, sorely needed for the diplomatic and judicial necessities, or from the bishop's vassals. These magistrates were "elected" by the citiziens in a manner possibly resembling an election by acclamation. Let's be clear that a "citizien" was a person of wealth who paid the city taxes and lived in the city's walls, most commonly of a non-military condition. To these consuls, after the start of the XII century, there begins to exist a sort of city assembly who was consulted when important decisions (say, a declaration of war) had to be taken, possibly even contesting or denying a consul's proposal. This assembly was usually made up of at least a hundred citizien and could provide approval by majority.
In the South of the pensisula, cities had a very similar structure, with one important difference however. As there had been a mixing of judicial practices given the presence of both Lombard and Byzantine institutions and populations (Naples and other cities on the coast would stay virtually independent Byzantine duchies well into the XII century), civic organizations and councils had to negotiate and mitigate power with an appointed royal official as there would always be a higher authority over them, a thing which was lacking in the other half of the peninsula. This official, called in various manners, depending on the period and area: a baiulus, especially in the Norman and Anjou periods or a stratigotus (also found in Norman times and reminiscent of Byzantine administration). Possibly, the term gastald could have been used in those cities within a Lombard principality or dukedom such as Salerno or Benevento.
As for the rest and majority of polities during the Middle Ages, a local leader whereas not clearly appointed by a ruler of the area (say, a Lombard gastaldus which was an official tasked with military and judicial powers akin to a vassal), might have been a wealthy landowner of free status, perhaps within the clientele of the bishop, abbot or vassal in the area and held informal influence and authority on his peers. Maybe there could have been a sort of informal designation among the denizens of a village of one person (or group of persons) who could be tasked with reprensenting the village in, say, a market fair or judicial court.
Unfortunately, as far as I have been to reasearch, there is little information on this latter examples.
In parallel to these institutions, there were what we could call free associations of people and citizens. Confranternities and the like were a very common occurrence in Medieval cities and sometimes, villages. Mostly concerning burial service for their brethren and economic and judicial aid for their families, they were in some cases founded through the intercession or influence of ecclesiastical figures, like monks and friars, while in all other instances were created by laymen binding together for mutual aid. These organizations too had an elective system both for the election of the head of said confraternity (most of times called a "prior") and for the acceptance or rejection of a member proposal, often through a vote made by placing a black or white bean (yes/no) in a wooden crate which would be emptied and the votes counted.
I hope this can help your question.