Is there any way to convert a .quest file to a .exe file or another file type that doesn't require the Quest desktop app or the quest website to run?
No, but Quest 6 exports as HTML that can run in any modern browser. I don't think there's any kind of plan for an .exe export option for 5 or 6.
So, is it possible to copy/paste the game code from 5.8 into 6 and then export it out as HTML?
No, but there's a converter for Quest 5.8 to 6. It's in the early stages of development right now, but has successfully converted some 'simpler' games. So, it'd depend on the complexity of the game in question. I don't have any more information I'm afraid, as I've not tried it.
More info can be found here, scroll down below the files. https://github.com/ThePix/QuestJS