There was something of a perfect storm in play that spelled collapse in a truly complete way. "Competent commanders" has no ability to prevent or fix a great many of the issues that lead to the fall of Western Rome. This is a little bit of a 'higher view' explanation in order to help illustrate this.
And when they stopped doing that? They were saddled with the truly staggering prospects of paying for the upkeep of all that military, as well as the infrastructure that was beginning to crumble behind them. An infrastructure that the bloated, overreaching military had largely built on their way to new wealth.
To add to the above, many Roman leaders adopted a policy of "buyout" rather than attempting to subdue/crush Barbarian tribes. Bribing Goth leaders with gifts of metals and gems and other luxury items was expensive stuff. The kind of stuff that doesn't do well for your bottom-line.
When you add to that tens of thousands of Alans and other German peoples fleeing the area known as Hungary, trying to escape the Huns, we have a storm in Gaul where Generals quabbled over Imperial influence and appointment while barbarians roamed the landscape looking for work and for food and their own little slice of the civilized life. Gaul, Britannia, and parts of Francia were effectively 'taken out of the picture'.
Alaric didn't just sack Rome, he starved Italia and decimated the source of pride and wealth for the entire half of the Empire. Never underestimate the power of morale.
The fact that Alaric was created as an enemy at all was a clear testament to the frankly awful leadership of people Honorius and Arcadius, as well as the doomed attempts at maneuvering that Stilicho would display as he ineffectually attempted to stitch Rome back together.
Poor leadership, poor wealth management, poor centralization of power, means that Rome's technological prowess quickly faltered and gave way against circumstances that it was 100 years too late to defend against. In short, Rome lost its edge rather completely.