In 2020, the ongoing COVID-19 pandemic caused major limitations for any aspect of social life and in specific for all events that require a gathering of people. While most events of this kind can be postponed or cancelled, democratic elections are key elements of any democratic regime and should be upheld if at all possible. Consequently, proper planning is required to establish the highest possible level of safety to both voters and scrutineers. In this paper, we present the novel and innovative way how the municipal council and district council elections in Vienna were planned and conducted using an discrete event simulation model. Key target of this process was to avoid queues in front of polling stations to reduce the risk of related infection clusters. In cooperation with a hygiene expert, we defined necessary precautions that should be met during the election in order to avoid the spread of COVID-19. In a next step, a simulation model was established and parametrized and validated using data from previous elections. Furthermore, the planned conditions were simulated to see whether excessive queues in front of any polling stations could form, as these could on the one hand act as an infection herd, and on the other hand, turn voters away. Our simulation identified some polling stations where long queues could emerge. However, splitting up these electoral branches resulted in a smooth election across all of Vienna. Looking back, the election did not lead to a significant increase of COVID-19 incidences. Therefore, it can be concluded that careful planning led to a safe election, despite the pandemic.