After the defeat of Antony, Augustus cut the Roman army from 56 legions down to 28 (some had been understrength anyway), created the Praetorian Guard for city police force duties and imperial bodyguard work, and created 28 auxiliary legions from among the conquered people.
There was already the issue of a basically fixed Roman population (even after bringing in the ethnic groups of Italy) having to occupy, police, and protect provincial populations and borders, so by Marcus Aurelius’ time the regular legions were drawn from non-Roman groups who (mostly) spoke Latin (or could get by).
The Empire was also struck by a plague. An analogous scourge (probably the same bug) hit China. Unless the barbarians were the carriers and had already worked up a tolerance for it, the plague probably saved the Empire. It emerged subsequent to the earlier war with Parthia, which lost, and was probably struck by the plague at or just before that time.
The border problems probably stemmed from a periodic pulse of Central Asian ethnic groups who spread out in at least three directions on a regular basis, centuries apart, corresponding to natural climate variation. After the Romans’ defeat of the Sarmatians, their equestrian culture resulted in a handy source of auxiliary cavalry, which was moved to Roman Britain. The locals didn’t like them, leaving them beholden to their Roman supervisors. That’s an old tactic, common in ancient empires.
An unintended consequence of Trajan’s long war of conquest of Dacia was the absence of what could have been a buffer state between the Empire and the wild wooly wilderness filled with who knows who. Trajan’s last conquest extended Roman rule to the shores of the Persian gulf. Hadrian was no warrior, and he wanted to kick back and knock off young boys. Roman military decline began with him.
The other problem is that the connection with Roman trade and Roman arms by working as auxiliaries turned smaller, disorganized tribal groups into bigger, more unified tribal kingdoms. The Romans found these useful as allies against enemies further afield and as auxiliaries, but they were also more potent adversaries for the Romans as well.
My point was that the Imperial system developed as a response to the inability of the Senatorial system to govern the Empire without civil war because any one Senator aiming for supremacy would be countered by the remaining Senatorial class. The creation of a professional standing army created a delicate tripod in the governance of the Empire: the Senatorial class, the Emperors, and the Army. Additional military pressure made that tripod unstable and Rome degenerated into a corrupt military dictatorship.
Let's just hope we don't follow the same progression.