Looking at the palaeontological evidence, intelligence, as measured by degree of cephalisation, does indeed seem to be inevitable. Intelligence increased continually over time, and it continues to increase. Both the pinnacle intelligence and the average intelligence of organisms increased steadily over time. Disasters and mass extinctions appear to have had no impact on this progress, or if they did have an impact it was to increase the rate of intelligence increase. So as far as the actual evidence we have (sample size: 1 planet), intelligence does indeed appear to be inevitable.
That shouldn’t be too surprising. Intelligence is one of the few evolutionary traits that has no necessary negative impacts and very few practical negatives. Size, for example, has necessary negative impacts. Even if a creature can become larger while keeping all other factors, such as mass, dietary needs or speed, stable, the very fact that it is bigger or smaller will prevent it from entering some openings or make it more prone to being swallowed. The same goes for flight, sociality etc. The very trait the creature is expressing is necessarily a survival liability in some situations.
Intelligence is an exception. If a creature can keep all other factors equal, intelligence in and of itself has no survival disadvantage. Even apparent problems such as curiosity leading to death can be overcome by simply maintaining the same basic fear mechanisms that a comparable less-intelligent organism has.
So its should come as no surprise that intelligence inevitably increases over time. An increase in intelligence provides an advantage at no or absolute minimal penalty. That intelligence then gets refined within the clade, and some of the clade then streamlines that intelligence by, paradoxically, becoming less intelligent. So birds, for example, are less intelligent than comparably sized mammals in most ways, but they pack a huge amount of intelligence into a very small brain. This sort of streamlining seems to provide a jump-off point for the next advance in intelligence.
Everybody in this thread seems making the same mistake: a tacit assumption that intelligence is binary, that an organism either has it or it doesn’t.
Intelligence isn’t binary in either kind or degree. Intelligence exists in an infinite variety and across an infinite spectrum. Humans are currently. at the top of the spectrum in most kinds of intelligence, but there is no reason to assume we are the pinnacle. A creature doesn’t need to be smart enough to destroy asteroids to be intelligent or to benefit massively from their intelligence.