But the Mahabali Emporor had no bad track record
This does not seems to be the case.
As per Bhagwat Purana, below situation is mentioned:
Bali Mahārāja, after offering obeisances to Prahlāda, the brāhmaṇas
and his spiritual master, Śukrācārya, equipped himself to fight with
Indra and went to Indrapurī with his soldiers.Blowing his conchshell, he attacked the outskirts of Indra’s kingdom.
So, basically, he was attacking and trying to acquire the property/wealth of Indra, by force. That does not seems like a good quality.
Also as you mentioned, King Mahabali was a generous man who won the praise of the world.
But the flip side of this is mentioned in Wikipedia:
This praise, from his courtiers and others, led him to think of
himself as the greatest person in the world. He believed that he can
help any one and can donate whatever they ask. Even though he became
benevolent, he became pompous of his activities and forgot that the
almighty is above him.
Bali become proud of his possessions(again, not the best of the qualities) as identified and explicitly spelled in S.B.8.21.34
vipralabdho dadāmīti tvayāhaṁ cāḍhya-māninā tad vyalīka-phalaṁ
bhuṅkṣva nirayaṁ katicit samāḥ
Meaning: Being falsely proud of your possessions, you promised to give Me land, but you could not fulfill your promise. Therefore, because your promise was false, you must live for a few years in hellish life.
After gaining all the strength, he become a threat to universe itself, as mentioned in Bhagwat Purana, S.B.8.15.26:
nainaṁ kaścit kuto vāpi prativyoḍhum adhīśvaraḥ pibann iva mukhenedaṁ
lihann iva diśo daśa dahann iva diśo dṛgbhiḥ saṁvartāgnir ivotthitaḥ
Meaning: No one anywhere can counteract this military arrangement of Bali’s. It now appears that Bali is trying to drink up the entire universe with his mouth, lick up the ten directions with his tongue, and raise fire in every direction with his eyes. Indeed, he has arisen like the annihilating fire known as saṁvartaka.
Now, of course, with this kind of situation, As per "Yada yada hi dharmasya glani.." declaration the God takes self-birth Avatars to destroy evil sinners and re-establish dharmic order.
Hence, Vamana Avatar.