The Democrats should have replaced Biden as president and not just as candidate.
Now is a great time for if I were there hypotheticals, so here's mine.
Once it was decided to run Harris and push Biden out, they should have gone all the way and used the 25th amendment to let Harris become president. This would have effectively separated her from Biden while still allowing her to take credit for the good stuff. She could have instructed the DOJ to start investigating price gouging now, and campaigned on needing to win to keep it up.
The 100ish days wouldn't have been enough for wholesale replacement, but it could have created a concrete message of this is where I want to go. A campaign focused on already delivering is a positive message people could get behind as well.
The 25th Amendment is written for a situation where the President is physically incapacitated and cannot relinquish his position. All the President has to do is state "Hey, I'm OK", and he gets his job back. The Cabinet is allowed to say "No, you're not", and then the matter goes to Congress, which needs 2/3 vote of both Houses to settle the matter. 2/3 of both Houses is an insanely high bar, and not liable to be met unless there is bipartisan agreement.
Now, I was an advocate of Biden stepping aside voluntarily and letting Harris gain the benefit of incumbency when he backed out of the campaign, but in retrospect that would have been a mistake also, because that would have tethered her more closely to the Biden Presidency and economy. (Plus, a new VP would need a vote in both houses, and we know Republicans would have let that sit out of spite, so that ties in the Senate could not be resolved.)
You're either spitballing how things could have been different because you're disappointed, or you're looking to add insult to injury because you're a douche. Neither is productive.
Sure a real primary would be better, but that wasn't a realistic scenario after the debate. Once you arrive at forcing out the incumbent president as a candidate, it's probably worth going all the way. It's a desperate move either way, and there are clearly downsides, but it could also help give the next candidate another boost.