In a large non-stick skillet over medium-high heat, melt butter. Once melted, add onions and sauté for 25-30 minutes, stirring occasionally until the onions are very tender and caramel-colored. Season with salt and pepper. Transfer the onions to a plate.
In the same skillet over medium-high heat, melt the butter. Constantly stir and scrape the pan as you go. As soon as the butter turns chestnut brown and smells nutty, remove the pan from the heat and set aside to cool slightly.
Bring a large pot of salted water to a boil. Add spaghetti and cook until al dente (about 8-10 minutes). Reserve 1 cup of pasta water and drain the rest.
Add the caramelized onions, browned butter, and ½ cup of the reserved pasta water to the bowl of a high-powered food processor (or high-powered blender). Blend until well combined. (You could also use an immersion blender.)
To the original skillet over medium heat, add the blended onion mixture, heavy cream, and parmesan cheese. Cook until the cheese is melted and the sauce is heated through. Add the cooked spaghetti to the skillet and toss until the noodles are evenly coated with the creamy sauce. If the sauce appears too thick, add a bit more of the reserved pasta water to reach your desired consistency.
Serve hot, garnished with additional grated parmesan cheese and parsley.