It's also going to depend on timing. Prigozhin/PMC's have gradually been accumulating more power at the expense of the professional Russian army and leadership. Also, as you pointed out, Prigozhin just released a bunch of criminals back into the wild. I think it will be interesting to see if they owe him loyalty for their freedom from prison, or if they fault him for the awful conditions they were deployed in. Prigozhin has apparently successfully blamed most of that on the professional Russian military and leadership, so the convict army likely sides with him. Putin used ties with the Russian mob to help consolidate power and that's an obvious route for Prigozhin to follow.
At this point, he would have to be considered the favorite to replace Putin, having a private army and a network of criminals. The longer it takes, the stronger Prigozhin's hand gets.
Regarding how that effects the war, there are people in Russia that Ukraine and the West could potentially hold discussions with. Prigozhin is not one of them. He's a criminal thug that would be a complete non-starter as a leader that Ukraine/the West could actually negotiate with, so the war would likely continue and depend on how strong his hold on power is.
Regardless of who it is, it's going to be difficult for anyone to match the level of control Putin has seized, especially on such an accelerated time scale. Unfortunately, the Russian people have proven themselves to lack even an ounce of independence, or self-respect, so they'll likely stand aside and accept the new czar and do what they are told. Same as they always have.