I would argue that the late third to mid-fourth centuries attest to the ongoing high quality of the Roman army well after the second century. There were a few disasters against foreign enemies in the mid-third century (Misiche, Abrittus, Barbalissos, Edessa), and much earlier the Romans certainly didn't perform particularly decisively against the Marcomanni. These issues speak to the fact that, as you say, the Roman army of the first and second centuries faced fewer challenges than in earlier and later times. With regard to the situation in the third century, Rome had not faced such a multitude of significant enemies on multiple fronts since the third century BC. Rome thus had to adapt, and adapt they did, with the rise of larger cavalry components (incl. cataphracts), standing field armies, vexillations, a heavier use of pikes, etc. But the biggest problem for Rome was political instability, not foreign enemies. The challenges of the period reflect the issues of military loyalty and political legitimacy more than a military weakness vis-a-vis foreign armies. Indeed, the aforementioned adaptability of the Roman army (and also of Roman administration, ceremonial, taxation, etc) is what enabled the success of the Roman army and Roman state of the late third to mid-fourth centuries.
Traditionally, Gibbon and those who follow him have considered the story of the Roman Empire from the late second century onwards as one of long decline (seemingly a very long decline!). But the Crisis of the Third Century is arguably a success story. After internal and external shake-ups, there was a period of Roman armies seriously kicking ass under Gallienus, Postumus, Ballista, Odainath, Claudius, Aurelian, Probus, Carus, Diocletian, Maximian, Constantius, Galerius and Constantine, not to mention the reinvigoration of the Roman administration and economy. As Ross Cowan has recently asserted, far from being a period of inexorable breakdown, 'their era marks the climax of the traditional legionary system' (Roman Legionary, AD 284-337, p. 4), with Diocletian creating more legions than any emperor since Augustus. The Alemanni were pummeled, the Persians were chastised, the Goths were effectively neutered for a period of decades, Franks were reduced into vassalage, victories were won over Sarmatians, Vandals, Nubians and Carpi, and so forth.
Constantius II represents a change of sorts, being unwilling to commit his army to a large-scale expedition against the Persians, but his access to experienced manpower was limited, his empire being divided between himself and Constans in a manner that entailed both a hard division and, for a time, even an internal cold war. The Franks and Alemanni invaded Gaul in the 350s, but this was again enabled by political instability. Julian ensured a return to stability, with his army demonstrating its superiority at Strasbourg. He eventually got himself killed against the Persians, but this was in a skirmish that he rushed into with no armour, not a battle that entailed a major defeat for his army (in fact, in the one battle of this particular war Julian defeated the Persians). The situation of course did start to change in the late fourth and fifth centuries, but the collapse of the western empire was very much driven in a major way by, yet again, internal instability. Rome's biggest enemy was ultimately itself. But it appears to me that the Roman army of the third and fourth centuries was still unambiguously the top dog in its part of the world, admittedly in part because of available manpower, but also because of organization, discipline and tactics.
In the Second Punic War (3rd Century BC) the victory to defeat ratio was fairly even (that's Hannibal for you), and in the Cimbrian War (Second Century BC) the ratio favoured Roman defeat, but in the third and fourth centuries AD the ratio was very much in Rome's favour, despite the fame of certain defeats (Adrianople, Edessa, etc). Indeed, these defeats owe their fame in part to the fact that a) they were to some degree unexpected (of course a battle that saw an emperor get captured is more famous than Odainath's, Carus' or Galerius' victories over the same enemy), and b) because the teleological Gibbonesque approach to late Roman history, where one views things in terms of decline and fall, encourages one to think of how defeats like Adrianople influenced or represented the eventual fall of Rome, rather than how victories like Milan, Nessos, Naissus, Fano, Pavia, Satala, Strasbourg and so on influenced or represented the recovery of the Roman state and its surviveability/adaptability, which would allow the Roman state to chug on in the east for more than another millennium.
If we're talking about how did the imperial Roman army compare to, say, contemporary Han China, well I don't know, and I don't know how one would make a decision regarding that, so I'm only talking about the context of Rome and its neighbors.