There should be some algorithm in place where if a faction leader leaves the faction it appoints a new member to be leader.
I think it should just pick whoever the next highest ranking member is becomes leader, and if multiple people are the next highest rank, then whoever was in the faction the longest.