I’m not an expert on the American justice system, and I guess it shows, but in most countries prosecutors are magistrates who are part of the judiciary and who are independent from the executive branch. For example in my country it’s like this: https://www.advocaat.be/en/words/magistracy
IIRC, this comes from the Napoleonic Code which many countries used as a basis for their legal system.
Thanks for the neatly summarized overview.