• Using the “substitute a pronoun” method:

    It’s true that “they tried to overturn the election” would lead to “who”

    BUT the whole phrase would be “nearly all of them tried to overturn the election” which leads to “whom”.

    So you’re not right, but not crazy to be confused.