I would use some sort of points system assigned during the race.
So each time a player crashes in the corner - add a point to "steering upgrade suggestion", each time he looses a race add a point to "engine upgrade", brakes for prolonged periods and misses an apex - "better brakes", gets overcome by an opponent in a straight line - "booster" and "engine" upgrades. You get the picture.
Detecting the right events can be tricky. You might need to add some cooldown period between adding more points or diminishing returns to the same item, so that e.g. multiple crashes during the same race wont make the steering upgrade score go sky-high. For example when player crashes into the corner you need to foresee and account for player could be hitting the walls of the corner a dozen of times before coming to a stop - that should be treated as a "one cornering fail", not a dozen. Said that, counters probably should be
Another tricky part is to come up with the right triggers and balance the points required to fire up a suggestion.
Considering that events won't happen that often and will be read even rarer, optimizing the underlying data structure does not really matter.