Having seen student politics with and without parties - my student union had them, my engineering society banned them - I'm convinced that it's not bad voters that ruin democracies but political parties. Parties need to simplify their messages to get buy in, and promote a 'team first' over 'issues first' mentality in their members. They're anathema to principles of honest debate and compromise.
The large scale something is, the more a political party matters. At a school level you can be closely informed about all of the issues and know all of the players. You can barely do that at the level of city politics. State and federal politics simply doesn't allow it.
Large scale democracies only work when people are willing to live together. If you play democracy as a winner-take-all game, it's going to fail sooner or later.
I'm not convinced that anything works at the national scale, at least not over the long term. I suspect that the US, as one of the oldest-and-largest democracies, is demonstrating a path that others will eventually follow.
The problem is that the side that organizes always wins over the side that does not. And it's very difficult to ban political organization (which is ultimately what parties are) in a way that is actually enforceable.
The American founding fathers were mostly of the opinion that political parties are bad and should be avoided if republic is to stand. Yet they found themselves organizing into parties before the ink was dry.
So the best we can do in practice is engineer the political system such that the damage from party groupthink is minimal.
This is all true, but I think the issue is upstream of where you're pointing - democracy declines when the goal becomes to win rather than to serve the constituents. Parties are a way to win and they also reinforce the idea that winning is the goal.
I'm not sure as to solutions but I don't think they're impossible - something like an inoculation of the entire political class against the memeset that prioritizes winning over serving the constituents. Then if an unofficial party tries to seize power in a system that officially disallows them, the majority is already primed to respond in an organized way.