I have read about kings trading victories every 20-30 years, especially the South Indian kings like Pallava, Chola, Pandya and Chalukya who win and lose regularly to each other. Is victory mostly determined by who can gather more alliances/vassals, except for rare cases?
Bonus question: What did the Imperial Cholas, from Rajaraja I, do differently from the others, which made them nearly undefeated for the next century?
They didn't trade victories every 20-30 years, but more over centuries.
The Pallavas , Cholas, Pandyas, Chalukyas all were in ascendance for long periods in time before being defeated (usually by a coalition) of the other competing kingdoms.
The time period might not be apt as the 9-11th centuries were a time when the Cholas were in ascendance while the Western Chalukays were not doing well and the Pandyas were pretty much wiped out by Parantka Chola I and his son Rajaditha Chola.
That said, our sources aren't very clear on the numbers that fought on each side, and tend to be embellished and really can't be trusted.
What we do know about are the complex web of alliances that each side wrought.
For instance in the Chalukyan - Pallava wars of 600 AD, the Chalukyas had an alliance with the Ganga dynasty and the Pandyan kindgom (which had been pretty much conquered by the Pallavas), while the Pallavas could only claim the support of the much weaker Cheras who had by 600 AD lost much of their lucrative trade with Rome (which had kept them very rich and thus they could field larger armies). The key reason Narasimhavarman could defeat this alliance was because Pulakesin II had overextended his reach and his war with Harsha of Kanauj had weakened both his armies as well as his treasury considerably.
The Rashtrakutas for instance defeated the Cholas, by leading an alliance of the Rashtrakutas, Western Ganga Kindom, Vana kingdom and some sources point to a 5th column of Pandyan plotters who rebelled deep in Chola territory to keep reinforcements from flowing to the front.
The Cholas and Pandyans who in this time period were sworn enemies (the Pandyans would finish this rivalry by ending the Chola line) had an alliance once to dethrone the then big cat, the Pallava Empire.
I could go into much more detail on various wars and campaigns, but suffice it to say that it is the second option that stands out - the alliances that each side could gather that determined victory.
One interesting thing to note is Sinhala and Chera 'interference' - The Sinhala kings and Cheran kingdom constantly sided with one party or the other, who favoured them.
There was a pattern, esp amongst the Tamil Empires, one side would form an alliance with the other dynasties to take on their feudal overlord (teh reigning dynasty), would manage to overthrow them, establish a stable kingdom, but the other dynasties would now start to plot under them. Usually the plotting dynasties sought the help of kingdoms to the North or West (Chalukya's, Rashtrakutas etc) to overthrow the ruling dynasty.
TBH, the land conquests of the Chola's were pretty on par with what the Pallavans or Pandyans managed (they did reach further north), it is their sea conquests that are stunning.
Sources -
K A N Sastri - "Colas" and "An Illustrated History of South India". Noboru Karashima's "History and Society in South India".