It is quite possible for the less skilled army to win if it is larger - as the saying goes, quantity has a quality all its own - or if it gets lucky, which does happen (though the bigger the war relative to the individual battles and decisions the more that luck gets smoothed out).
That's just a general philosophical rule, really - competence relative to the foe isn't necessary or sufficient to win, though of course it helps.*
There's also a danger of doing what could be called "post hoc" analysis - which is to say, highlighting the incompetence of those who fail and not paying proper attention to the incompetence of those who win, so it looks like the least incompetent army won. It's harder (though possible) to spot incompetent or "bad idea" actions which didn't lead to negative consequences but could have - so, for example:
Lee's dividing his army during Loudoun Valley didn't lead to negative consequences, but only because the AotP was paralyzed for a week as they switched generals.
Meade's generalship at Gettysburg didn't lead to negative consequences, but only because Lee's echelon attack on the second day stalled due to one of his commanders getting shot and the sequence being disrupted.
Grant not digging in at Shiloh didn't lead to a defeat, but if the enemy army had been as big as he at some points claimed it was it absolutely would have done - it's his numbers relative to his enemy which cushioned the impact of what could be called an incompetent decision.
*CEV calculations are designed in part to try and tease out factors other than numerical strength which affect the outcome of a battle, of which one (though not the only one) is the relative competence of the two sides. The lopsided battle of Koniggratz is a good example of a battle where competence does win the day (equal numbers and very unequal outcome).