He never had a plan, he just went with the flow
They whisper to the desperate, if you go to the nearest body of water, a heavy fog will cover the area and a boat will appear in the water. The moments before the boat reaches you will be your last opportunity to change your mind and leave because when that boat docks, you'll be swept away by the spirit of the Yiling Patriarch and his son.
Most of the sects scoffed at this, Wei Wuxian is good and dead! And he doesn't even have a son, he would have been killed when they rid the world of the demon. Lan Xichen hid a smile behind his cup as Nie Huaisang snickered to himself and Jiang Cheng loudly scoffed. As no one's asked him if these rumors are true, it'll remain a secret between the three of them.
TLDR: Wei Ying became a god, Lan Yuan also became a god, the dead get revived, a sect is made, and the Jins can burn in hell, not you three.
Also, quick note I'm going to put here, this story tends to jump perspectives a lot. So, if that's not your cup of tea, this is your only warning.