There's an issue with Chinese culture, surely? In the Chinese social hierarchy, merchants were rock bottom, akin to beggars on the street if I recall. The issue was that they didn't directly produce anything which contributed to the economy, they only acted as middle-men, so in the Chinese mindset they were just interlopers who got rich on other peoples' labour - the ultimate undesirables. The problem was bad enough that successful merchants often bought land and became simple peasant farmers, because it was a step up the social ladder.
In this situation, a merchant republic seems highly unlikely. Even reckoning without the strength of the Imperial government, no-one outside of the merchant class wants to be a merchant, and they certainly don't want to be ruled by one. It's like hypothecising about a "true communist" republic in medieval Europe - anyone with even a little money or land has incentive to actively oppose the idea, so it would never happen. The likely response to a Chinese city becoming controlled by its merchants would probably be violence and a massacre of the merchant class.
Now, India is a far more palatable idea.