There would have to come a time when Andy and Barney would had to think about when to step down from being Sheriff and Deputy Sheriff. Before that they may have had to hire on younger men or women to help them with patrolling the town and the county. Some of Opie's childhood friends went into law enforcement.
One or two after high school became cadets and graduated from the North Carolina Highway Patrol lived and served their time in the area of Mayberry. Others joined the military and became military police officers and served their time and returned to Mayberry. Andy would hire them as Deputies.
Andy and Barney then decided to ask one of them to run for Sheriff and Andy and Barney would run for Mayor or position of the county. Andy and Barney would be elected for Mayor or other position and one of the Deputy would be elected Sheriff and one of the Deputies promoted to Deputy Sheriff.
Andy and Barney would serve as Mayor and the other position until retirement or death.