Bring a small pot of water to a slow simmer over low heat and keep it warm.
Heat the oil in a large nonstick pan over medium-low heat. Add the onions, season with salt and pepper, and cook 20 to 30 minutes, until the onions are very soft, taking care not to let them get caramelized and adding a little hot water if the pan starts to get dry.
Grate the potatoes into the pan with the onion. Work the potatoes and onions together until they are fully incorporated into a very sticky and wet paste.
Add the cheeses to the potato mixture. Work the mixture until all the cheese is melted and incorporated and you have a uniform paste.
Smooth the mixture into an even layer to cover the pan’s bottom and cook until lightly browned on the bottom, 5 to 10 minutes.
Place a large round plate upside down on top of the pan. Turn off the heat, then invert the pan and the plate together so the frico ends up on the plate. Set the pan back on the stove and continue to cook until a light brown crust forms on the bottom, 5 to 10 minutes.
Serve the frico on a large wooden tray or cutting board.
