But importantly, four of them (Tyler, Fillmore, Johnson, Arthur) were “accidental” incumbents who became president only due to another’s death.
Carter held off Teddy Kennedy in 1980 but lost to Reagan.
George HW Bush beat Pat Buchanan in 1992 but lost to Clinton.
The primary challenge didn’t deny them renomination but it hurt them enough to deny re-election.