1) The fact that AI gets cheaper units means that it suffers comparatively more happiness penalty from whipping. For example an AI axeman may cost 29h due to discounts - this means it cannot possibly be 2-pop whipped. Since the AI wont really use 1 pop whips except in total desperation, this means that the AI almost never whips early units. It may whip later units a little, but by then slavery starts to lose much of it's appeal.
Basically the AI whipping potential is very limited by happiness - much moreso than with humans (and humans are already highly limited by happiness). It's not the perfect balance but it's workable.
2) The AI doesn't actually whip much anyway.
In Warlords 2.08 the AI gained a simplistic algorithm of "Always grow, and whip away the excess", that was because it was the simple strategy used to work around the abysmal governor.
In BTS the governor does an infinitely better job of balancing growth with bringing in hammers from the land. This means that players and AI alike don't need to use slavery as a crutch.
3) While in principle it would be possible, if extremely difficult, to optimize the AI to make use of it's growth bonuses in order to leverage slavery to the extreme, this optimization was not done. The AI does not systematically abuse slavery, basically the productivity the AI gains under Slavery is completely in line with the other AI bonuses.
Note: It is quite likely that strong early AI armies are chopped moreso than whipped.