Text this: Topological classification of critical points for hairy black holes in Lovelock gravity