My best guess is that Lucas's initial plan looked something like this based on the information available to us. Though please note that I tried to condense the information chronologically whereas most sources have piecemealed it together which I believe is where a lot of the confusion comes from.
-remake Flash Gordon but with better effects. When he couldn't afford the rights he decided to write his own space adventure series in the same vein.
-he wrote several treatments of the OT (as we know it) was initially conceived though it would undergo heavy revision as each installment was made. The OT, especially A New Hope, went through fully written drafts, and the number of episodes was toyed around with and changed constantly depending on how he felt at any given time. It also would depend on how much money the studio was willing to give him.
- by the time he was into preproduction on Return of the Jedi his marriage to Marcia was crumbling and he'd spread himself too thin trying to build his companies and finish the trilogy, so that he crammed all of his ideas into that film, condensing what could have spread out into many sequels into a single movie.
Feeling he was done with Star Wars he called the story finished in 1983 and basically retired from directing to focus on raising his daughter and continue building said companies.
Nearly 20 years later he rereleases the OT with the special editions, going back "fix" the things that always bothered him about the initial release. During his time revisiting the story with his changes he feels the tech has finally caught up enough to warrant doing the PT and began preproduction in 1996. His suspicions feel warranted that they will be successful when he sees the reactions the public has to the SE success in the theater.
He makes the PT and is finally happy that he no longer has to answer to people who question his vision and not feeling the need to compromise creatively like he did with his first trilogy. Though despite the successes they were at the box office he feels slighted by the fan backlash and once ROTS is released in 2005 he decides to once again retire and call Star Wars finished.
He spends the next few years further tweaking the OT, much to fans dismay, and working on other projects, though many of them aren't the financial successes that Star Wars was.
He becomes bitter at the fans anger towards him and decides to sell his company to Disney in 2012 hoping they will continue his saga with the treatments he sold them as part of the sales agreement.
The other two motivations behind the sale are that the film's he produced in the wake of ROTS underperformed at the box office and with hundreds of employees to take care of he felt Star Wars should continue in order to keep from lay offs or crumbling the company altogether.
The other motivation was personal and he knew he may not live long enough to finish a new Star Wars trilogy which would take up his twilight years and he would never officially retire. Unwilling to make the same mistake he made with his first marraige, he decides to officially retire and sell his company becaue otherwise he would never let go. By then he'd remarried and had a new baby to take care of and wanted to spend the rest of his life enjoying his family as well as pursuing other creative interests without having to be beholden to his own creation.
Inquisitor Peregrinus I defer to any insight you may have, though I think I have the broad strokes of it.