Did Scott do the right thing by killing Kang?

One of the weirder moments of Quantumania is in Scott’s voiceover at the end where he questions if killing Kang was the right thing. He remembers that Kang said if he wasn’t let out, something very bad would happen. So, Scott thinks, maybe he should’ve let him live. What Scott fails to consider in this train of thought is what would have happened if he did let Kang out: also something very bad! Probably Kang destroys everyone and everything in this timeline as well as several others. So Scott was in a lose-lose situation and, at least by killing this one Kang, he bought himself—and the MCU—some time.