A very, very specific idiom for a type of sloppy victory

Solution 1:

Choice may depend on context and on the degree to which you specify a "string of mistakes", but four notions come to mind:

It is the "right outcome for the wrong reasons", a "happy accident", a fluke.

Right for the Wrong Reasons

Someone makes a conclusion based on what they perceive are facts. Their conclusion is correct but the assumed facts themselves are wrong.

TV Tropes

happy accident = when something unexpectedly good comes from what would otherwise be considered a mishap.

"The discovery of Guinness was a happy accident"

Urban dictionary

fluke = something good that has happened that is the result of chance instead of skill or planning

Cambridge dictionary

Another single word description is

serendipitous: come upon or found by accident; fortuitous:

"serendipitous scientific discoveries."

of, relating to, or suggesting serendipity. good; beneficial; favorable:

"serendipitous weather for our vacation."

Dictionary.com