The distributed wireless ad hoc network caters to users' demands for high reliability, low latency, and low cost. It has the characteristics of low operation and maintenance costs, strong scalability, no center, and self-organization, and has wide application prospects in 5G and industrial Internet of Things. The access process is a key process for the operation of distributed wireless ad hoc networks, which has a huge impact on its performance. The distributed election mechanism is an effective solution to avoid access collision and achieve efficient access. The number of interactions in the election mechanism will affect the amount of information obtained by the nodes, which will affect the performance of the network's election success probability, delay, and efficiency. When the number of interactions is small, the node obtains less information, and the collision and waste of time slots are serious, resulting in deterioration of network performance. Increasing the number of interactions can increase the amount of information acquired by the nodes, but it will also increase network delay and network overhead. However, the current research on the number of interactions is insufficient. Therefore, this paper studies the impact of the number of interactions on the legal election set and establishes the analytical models of election success probability, delay, and efficiency. The range of interaction times is determined by maximizing the efficiency, election success probability and minimizing delay. Finally, simulation results show that the number of interactions should be adjusted according to the network scale and efficiency.