I still remember when I did by coding boot-camp in JavaScript, my code was always a mess and I had to make it short by using a lot of functions and objects and still wasn't easy.
Also, always build a chart from start to finish with big titles for your games, like this is the start, this what will happen, then he gain power and finally he beat the demon king.
Now as an advice, if you still want to do this game, take the assets again and start by making small chapters of the game. By releasing the game into different chapters, you will keep your code small and you will see clearly where you are at and where you go from there.
Do a remake if you want but don't do it as a summary just rework the existing assets into chapters and see if it works for you better this way.