Preheat the oven to 375°F (190°C). Wash the potatoes, wrap each tightly in foil, and place on a baking sheet or stone; bake until very tender, about 90 minutes. Remove from the oven, unwrap, and allow to cool until they can be handled but are still warm.
Peel the warm potatoes and press them through a ricer onto a clean work surface, or mash gently so there are no large lumps.
Make a mound of the riced potatoes and sprinkle the ricotta over them; gently fold to distribute without overworking.
Add the flour and 1/4 teaspoon salt to the potato-ricotta mixture and fold gently until combined.
Make a well in the center, add the lightly beaten egg, and work it in with a gentle folding motion to form a soft, smooth dough; avoid overmixing to prevent dense gnocchi.
Cut the dough into 4 pieces. On a lightly floured surface, roll one piece at a time into a rope about 3/4 inch in diameter. Use a floured knife or scraper to cut the rope into 1/2–3/4 inch pieces.
Shape each piece by pressing gently with your finger or rolling it down the back of a fork to create ridges.
Bring a large pot of salted water to a boil. Reduce the heat so it is simmering gently, then add gnocchi in batches without crowding. They cook in about 2 minutes and will float to the surface when done.
Use a slotted spoon to transfer the cooked gnocchi to a clean, dry baking sheet while you cook the remaining batches.
Toss the cooked gnocchi with warmed marinara sauce, sprinkle with Parmesan and fresh basil, and serve immediately.