You are correct that Union victory was not preordained, given their dearth of effective military leaders.
General McClelland comes to mind.
Indeed, had the slave-power declared secession under a President Buchanan type, it may well have happened relatively peacefully.
But of course, they had no reason to secede under Buchanan.
Against expectations, Lincoln eventually proved a capable war-president, and found effective generals to lead the effort.
Yes, I'll grant you that any number of "what-ifs" might have changed the outcome, but one "what-if" would not change, short of Lincoln's assassination early in the war: Lincoln was not going to give up the fight unless completely defeated, and given the relative strength of the northern military-economy, that seems most unlikely.
Indeed, unlikely enough that I'd call Union victory more-or-less inevitable.
So, the Confederacy's fate was sealed because Lincoln (like Washington & FDR) was an "Unconditional Surrender" kind of guy.
I agree with you.
Lincoln had a remarkably unlikely background for a great war leader, much more so than Davis, for example. But he turned out to be a lot more effective than Davis.