Since the "Smith" virus is the opposite of the One, did Neo's five predecessors create viruses like Smith before by killing an agent or not even doing anything?
I'm going to go out on a limb and say "no", solely based on the fact that the Deus Ex Machina was incapable of working out a way to defeat Smith while preserving the Matrix.
Neo turns up and it threatens to kill him, something that it wouldn't have done if it had known he was the solution. It then accepts his proposal, again, something that wouldn't have happened had it had a better alternative, which it surely would have done if it had encountered this same problem in the past.
It is arguable whether previous iterations of the Matrix faced a similar emergence of "virus"-agents. I will explain why below and why we can't know.
The Architect revealed that the Chosen One, like Neo, get his power from the "remainder" of an unbalanced equation, the core equation running the Matrix.
This why Neo has so much power (and gains more if he can destabilize further the Matrix and its equation), because the equation (and its anomaly) is systemic, global, as it affects all the system, from the top to the most basic and simple programs. This is a general flaw at the foundation of the system, it's not just a vulnerability in a specific program, the anomaly affects everyone and everything in the Matrix:
Your life is the sum of a remainder of an unbalanced equation inherent to the programming of the matrix. You are the eventuality of an anomaly, which despite my sincerest efforts I have been unable to eliminate from what is otherwise a harmony of mathematical precision. [...] As you are undoubtedly gathering, the anomaly’s systemic, creating fluctuations in even the most simplistic equations.
It is thus clearly stated that the anomaly is systemic, which means that not only is the Chosen One affected by the anomaly, but also all Matrix entities, from the most basic ones to the most complex.
This suggests that although the Chosen One has the exclusive possession of the "remainder" (=powers) of the unbalanced core equation, other entities might compensate (mechanically: the missing remainder must be complemented by something else, else the unbalanced equation alone could not work and the Matrix could not continue to run). This is hinted at by Smith in Matrix Reloaded:
- Agent Smith: Surprised to see me?
- Neo: No.
- Smith: Then you're aware of it.
- Neo: Of what?
- Smith: Our connection. I don't fully understand how it happened. Perhaps some part of you imprinted onto me... ...something overwritten or copied. It is, at this point, irrelevant. What matters is... ...that whatever happened, happened for a reason. [...] And now, here I stand because of you, Mr. Anderson. Because of you, I'm no longer an agent of this system. Because of you, I've changed. I'm unplugged. A new man, so to speak. Like you, apparently free.
It can be argued that rather than being a copy of Neo's "code" into Smith, the "connection" is rather the impulsion into Smith of an "anti-remainder": by destroying Smith using his own anomaly, Neo generated a counter anomaly. This would be consistent with the movie symbolism, representing Neo and Smith as the yin and the yang: two complementary parts that are necessary to balance the whole (Matrix system). And indeed, all along the Matrix 2 and 3 movies, Smith's progress remarkably parallels Neo's: the more powerful one is, the more will be the other. But whereas Neo achieves his power on his own (by being granted the "remainder"), Smith accumulates power (=anomalies) by cloning into other entities, thereby feeding on the bits of compensatory "anti-remainders" that every entities might possess.
Let's get back to the Architect: we also learn from it that the Matrix has a measure of control: reinsert the Chosen One back to the core, which indeed inserts the missing equation's "remainder" (missing from the Matrix point of view, because only the Chosen One possess it, until he gives it back to the Source):
The function of the One is now to return to the source, allowing a temporary dissemination of the code you carry, reinserting the prime program.
Why does this matter? Because arguably, if you insert the "remainder" in the equation, you balance it, effectively destroying any anomaly and any remainder, as well as any anti-remainder. In this case, even if an agent (or another entity of the Matrix) got over-powered like Smith, they will essentially be reset, along with everything else.
However, in Matrix Reloaded, Neo chooses NOT to reinsert the remainder to the Source, which creates an unprecedented scenario: the remainder is allowed to grow uncontrollably, and so any other anomaly like Smith. This allowed for Smith to become so anomalous, so powerful, that he could take over the Matrix, whereas in previous iterations he would have been reset with the rest when the Chosen One would enter the Source.
This explains why Deus Ex Machina nor any other entity had no contingency plan to mitigate this issue, as it never happened before that an entity could gain so much power: all anomalies were already reset long before the anomalies could accumulate at this threatening level.
To conclude, there is no clue in the movies suggesting whether or not previous Matrix iterations saw the rise of over-powered program entities to counter-balance the Chosen One powers. What is stated is that the anomaly is not limited to the Chosen One, but systemic, so all entities in the Matrix possess a bit of the anomaly. It is also known that previous Matrix iterations did not see the rise of such powerful entities capable of taking over the entire Matrix, but whether this is because of the Source reinsertion program having worked well up until now, or either because no entity was clever enough to clone into everyone to accumulate anomalies, remains totally up to debate.