I personally think of the dark side ending of KOTOR I to be canon. It works the best thematically both for that game and for leading into KOTOR II.
I'm somewhat bothered by the unfortunate implication that the Jedi Order was ultimately totally vindicated and justified by memory wiping Revan in the end with no real drawbacks for something that I frankly find even more abhorrent than just execution. The Jedi Order's flaws and incompetence should be better portrayed in the first game since it's such a major plot point both in how the Mandalorian Wars were handled and then the over all plot of KOTOR II.
To me it makes sense that wiping Revan's memory only managed to put a superficial bandaid on the issue and actually ended up making the problem worse. Revan was a pragmatist using the dark side for his own agendas. You can argue he was being subtly influenced and sliding down a negative path but everything seems to more or less imply he had a handle on the dark side. By wiping his memory you've essentially taken someone filled to bursting with the dark side and removed that mental willpower safe-check.
The protagonist starts as more or less a blank slate but as their power grows that dark side corruption within Revan festers and while the protagonist may have been conditioned to try and adhere to the light side they've lost that strong mental fortitude that Revan once had (at least until the memories begin to return, more on that later) causing him to struggle with his morality. I think growing frustration with the limits of the Jedi code, his real underlying personality returning, and the final nail in the coffin being the reveal of what the Jedi did to him causes him to free fall to the dark side way worse than he ever did to begin with. He turns his back on the Jedi violently and accepts Bastila's offer to retake his mantle as Dark Lord not even really understanding what that means yet. He essentially just larps as the "Darth Revan" he's heard about as a knee jerk reaction to the revelation of what the Jedi did to him.
However that doesn't last. As his memories begin to return he starts to become more of his old self. He sort of balances out back towards the pragmatic middle he had before the memory wipe. He realizes the true purpose of his mission against the true Sith. This causes him to abandon the petty empire building that was always just a cover for something far greater. This would explain why both the Republic and Sith are so fractured and decayed by KOTOR II. The Republic essentially lost in KOTOR I but the Sith had their power structure decimated and then their new figurehead abandon the entire project creating a massive power vacuum. Jolee and Juhani play no role because they were killed on Lehon.
The Jedi mind wiping Revan ultimately serves as another example of their ivory tower and meandering problem solving resulting in an even larger disaster. They essentially made the problem horribly worse by taking Revan turning him from a highly competent and focused man into a confused amnesiac barely containing that dark side corruption until learning about what the Jedi did. Which sends him over the edge and turns him into the evil Darth Revan they believed him to be, at least for a time.