https://forums.totalwar.org/vb/showthread.php?t=71772

Think you've probably found the old favourite loyalist revolt problem again, please read through that thread.

Solution is to either not have mercenaries, or to make sure that the there is one unit and one unit only in city when it rebels (not necessarily possible if its an AI city) or the actual practical solution: Make sure the faction it is going to revolt to has a unit it can build in that city. See end of thread for how EoD and FATW handled that.

Note problem is normally caused or at least made worse by removing peasant units from being able to be built in core buildings.