Because of the lack of loyalty to the emperor in Rome and that the empire grew steady, the leaders had to hire mercenaries to keep the new empires borders. Their loyalty wasn’t like the populations, but since the people in the Roman Empire didn’t want to fight there were no other solution. But when the Romans couldn’t pay the remunerations to the mercenaries their loyalty fell gravely, and the other countries had no problem of invading the Roman Empire.
One big part of the succeeding of the roman empire was the extensive trading that was developed around the Mediterranean sea, especially after the construction of Via Domitia, the road built not only for fast transportation of troops but also for shipping goods around in the empire. The Romans prosecuted trading in for example France, Spain and Great Britain. All the wars gave the Romans war trophies but also an opportunity to impose taxes from more inhabitants in the growing Roman Empire. Big economic resources were needed to keep the loyal army, but of course the inhabitants didn’t want to pay taxes, and the imposing of taxes became an impossible task. Taxes rose in the cities where people couldn’t refuse paying taxes. The result of it was depression and high unemployment.
There were also a lot of diseases in the old Roman Empire, which killed a lot of inhabitants. For example, when the plague broke out it killed about half the population. The roman empire was also much more fragile for this kind of diseases than Sweden where just one third of the population died of plague in the 14th century, because in Sweden the inhabitants lived much more isolated and the plague couldn’t spread that easy. But the plague was also good for the Romans in one way. When the barbarians attacked the Roman Empire their harryings were stopped close to Rome. They didn’t dare to attack the city when the plague was raging inside. One other disease that was common among the Romans was lead poisoning. It is known that a part of the roman population suffered by some of the symptoms of lead poisoning. Lead was for an example used in the aqueducts, and since everyone in cities drank water they got poisoned.
One other important part in the Roman Empire was the farming, because it gave food for all the soldiers and mercenaries in the empire. But the earth got more and more impoverished and when the soldiers didn’t get their food, the empires defence got weakened.
All of this, among some more, made the Roman Empire much weakened, but the doom of the Roman Empire came after being attacked at two fronts, just like Germany during the Second World War. The borders fell, and in 410 A.D. the Visigoths could pillage Rome. The second plundering came at 455 A.D. by the vandals, and the third at 472 A.D. Now Rome was just smoking ruins, and Italy was occupied. Rome wasn’t any longer the metropolis it had been.
But then, what is the main reason? There were a lot of problems, and it’s hard to split them into different groups because they are so connected to each other. The Roman Empire was much too big to be defended at its borders, and it is extremely hard defending such a big empire at two fronts, the same time. Nearly every reason for the fall of the Roman Empire you can find is connected to the deterioration of the defence, and that deterioration is the main reason, caused, mainly by, bad economics and impoverished earth.
I don’t think that there is anything the Romans could have done better, or of course it is things that they could have done differently to make it better for a short period, but the empire would have fallen anyway. It was much too big to be defended at the 5th century.