If it is doable?? I think it would be...
Maybe. If we split the post into fractions, then we can look at each and see if and how it could be done.
However first I would say that this could be a game breaking feature, at least if it is done incorrectly.
So my thinking was, when you research a tech (specifics later) at the end of the classical age, it triggers a 'Collapse' Event.
Random event with the condition that the player has a certain civic. If we then set the likelihood to 100%, then it will happen when the civic is added to the player or at the start of the next turn depending on how the code is. If we set the likelihood to say 20%, then it will happen, but then the player can't be sure precisely which turn it will happen in. Maybe the change could be 1-5% * number of civics of a certain category owned by the player. Imagine drawing a horizontal line on the tech tree and say each line left of the line adds to the risk of a collapse. That will prevent the player from just avoiding the trigger tech for strategic reasons.
The random event should have a setting saying that it can only happen once, or once for each player or whatever.
These trigger conditions would be good to have in general.
In this event is a Revolution, where 'hopefully' there will be a lot of towns around the edges of your empire (or everywhere) that will be under the loyalty threshold (say 30-40% maybe) and these will 'flip' to the rebels, taking any city based garrisons with them. Thus you have to fight to keep these Towns in your Empire.
Leaving your troops on the map unchanged is the easy part. However maybe the rebels will take over the plots next to the city and push your units to nearest valid plot. I'm not sure what the trigger conditions are for those moves.
I don't know what to do about city flipping.. at least not yet. Support for a random event where a city turns into barbarian or whatever wouldn't be bad though. Barbarians would need an upgrade for this as their current setup crashes the game if they gain a city. If I recall correctly, it tried to move a unit out of the city where it would gain the default profession. However default profession isn't set for barbarians. Or was it city growth where it would gain a default unit and it was the default unit, which isn't set

Either way there is an issue if barbarians should be able to control cities.
In this event we can also have a raider spawning, (like your saracens) that start to appear around the edges, maybe it could be like 'Spawn min 3 squares from culture borders' or something like that so that you get the kind of hordes rushing inward on your empire.
There is a function to tell if a plot is within visible range of a player. Barbarian/animal spawning use this if I recall correctly.
As I am thinking that 'revolutions' will be like civic changes in civ (as the mechanic is already in Col., start a Rev. choose your civics (constitution) fight the Rev. army (rebel opposition)) The ensuing 'Anarchy' Revolution could have a timer of X turns, and at the end of X Turns the rebels turn into a faction, taking any cities you haven't taken back and any of their remaining army with them. If you take back all the towns but don't beat the army, they can go off and found their own towns.
I'm not sure we need a timer. It might be way easier to just create a new player.
Be warned though. There is a hardcoded limit of 32 players at the moment. This can be increased to around 60 (not 64, which is otherwise a normal hard limit is programming). However increasing the max to more than 32 will slow down the game even in games with less than 32 players. The slowdown isn't big enough to avoid increasing the number of players if the increase is justified by gameplay. However it shouldn't be increased "just because we can".
If we have a big game and each player splits into two, then we can quickly go from 30 to 60 players and then we add barbarians as well. All of a sudden that 60 isn't high if you want to be able to split players into two. You can't reuse the slot of a dead player. Well you might be able to do that, but it would be ugly and likely to result in bugs.