When talking about chariots and their use and disappearance, you have to consider that chariots filled three different tactical roles. These were not all used by cultures that fielded chariots, and they did not become obsolete at the same time.
1. Shock: The chariot acts in the manner of heavy cavalry and engages in melee with enemy troops. Examples: Hittite 3-man chariots, scythed chariots fielded by Persians and others.
2. Archery Platform: The chariot acts in the manner of horse archers, acting as a mobile firing platform. Examples: Egyptian New Kingdom, probably Mitanni and others.
3. Battle Taxi: The chariot is not a fighting platform at all (or at least not primarily), but rather is used to move warriors to/from a battlefield. Examples: Myceneans, Iron Age/Classical Celtic peoples.
The heyday of the chariot is probably best placed around the 13th century, because that's the century of the iconic Battle of Kadesh, the battle that was for chariots what Kursk was for tanks. At that point you see the "Shock" and "Archery Platform" roles fully developed; in particular, the Hittites favored a heavier chariot in which melee was prioritized over archery, while the Egyptian chariot tended to be lighter, faster, and exclusively for ranged shooting.
The Archery Platform role was the first to become obsolete. The main reason for this is the development of cavalry. To be fair to the chariot, it does have some qualitative advantage over a horse archer - the archer can potentially use a longer bow and can shoot in any direction regardless of where the vehicle is headed. That advantage, however, came with a substantial relative cost. A horse archer brings a bow to bear for the cost of only one man and one horse; a chariot does the same at the cost of two men, two horses, and of course the chariot itself. The math is pretty clear on this one, even if we don't bother to look at the other drawbacks of a chariot (performance on terrain, fragility, and other things people have already mentioned). Historically the adoption of the horse archer meant the end of the "archery platform" role. That's not to say nobody ever carried a bow on a chariot ever again, but that archery was no longer a reason to build and field chariotry.
Around the time of the Bronze Age collapse, the chariot as an archery platform may have been going obsolete for tactical reasons as well. Chariots were often fielded with "chariot runners," light infantry who ran along to accompany the chariot. Nomadic and pastoral peoples on the fringes of the powerful settled states were often selected for this role; their lifestyle presumably provided them with the necessary athletics. Towards the end of the age, however, you get substantial influxes of new nomadic peoples, now increasingly armed with iron, and as it turns out "chariot runners" when armed with javelins could also be pretty proficient "chariot killers." The development of a better "counter" for chariots in general, of both the archery and shock variety, may well have started their downfall even before horse archery became widespread, and even in places where horse archery never became common.
The Shock role lingered on for a while longer, but it was severely attenuated. A chariot offers an attractively large bit of mass to throw around, but the cost and fragility means throwing them around is likely to lead to a costly wreck. The Hittites seem to have dealt with with this issue, but the armaments of the time and the terrain of their homeland may have contributed to what seems to have been an effective shock chariot force. The "scythed chariot" was a much later attempt to utilize this mass in an otherwise unfavorable environment by armoring and arming (with scythes!) the vehicle and team, but without much efficacy. The Persians, bless their hearts, kept this chariot role on life support for a while, but with the demonstrated defeat of scythed chariots and the increasing sophistication of heavy cavalry, it too eventually dies. The stirrup really has nothing to do with it.
Which leaves us with the Battle Taxi. Any chariot, of course, can be a taxi, but it's only a taxi primarily when it can't fulfill other potential combat roles. This was probably the primary way the Myceneans used theirs - their home terrain wasn't great for the other roles, or for horses in general - and it is the role in which the chariot survived in Celtic societies into the Roman era, most famously in Britain.
Chariots are intrinsically upper-class vehicles because of their expense, so in the battle-taxi role the chariot is primarily a taxi for the elite (perhaps "battle-limousine" is more apt). You would not bring a whole army to the field in chariots, but you might take the noblemen that way. For that reason it's not much of a rapid-deployment device - you can only rapidly deploy a very small proportion of your force. It becomes more of a status thing: "I get driven to battle, I don't need to walk." (It's also great for running away, as having a chariot and driver waiting to pick you up if the battle goes south makes your survival odds much better than the common footslogger.) This association with status is the reason this role is the last to die - at this point the chariot has become a symbol of prestige and power rather than an actual weapon of war. It doesn't need to be efficient; inefficiency is the whole point.
This is not to say that Classical-era Celtic or Bronze-era Mycenean chariot-users never fought from their chariots; on the contrary, they almost certainly did. Without the resources of Egypt or Hatti to field huge chariot divisions, however, the chariot only dabbles in a true combat role. The king can show everyone his prowess in javelin-throwing from his chariot, but chariot-thrown javelins are not going to be a deciding factor in the battle.
A big caveat to all this is that I know next to nothing about Indian warfare - I couldn't tell you what the history of chariot roles was there.
As for Total War, "Rome: Total War" got their chariot roles very wrong, but to be fair, the battle-taxi role - the main role of the chariot in the Roman era - was not one they could have used (the RTW engine didn't allow you to "dismount" your charioteers). So instead, they put their chariots in the other combat roles, gave them anachronistically to factions that had abandoned them (looking at you, Egypt), or increased their viability to make them something other than the laughingstocks they actually were (scythed chariots). I haven't played the new Rome and couldn't tell you if they did any better.