Place potatoes and onion into a large bowl and pour enough cold water in the bowl to cover by several inches. Let rest until potatoes and onion are completely soaked, 20 to 30 minutes. Pour potato mixture into a colander, rinse, drain, and squeeze repeatedly to remove all moisture.
Whisk eggs, flour, salt, black pepper, and cayenne pepper together in a bowl until smooth.
Mix potato mixture and egg mixture together in a large bowl with a spatula.
Heat 1/4-inch oil in a heavy skillet over medium-high heat. When oil shimmers, drop large spoonfuls of potato batter into hot oil and flatten with a spatula to about 1/2-inch thick. Cook until the edges of pancakes are golden brown and crispy, 3 to 5 minutes. Reduce heat to medium, flip pancakes, and cook until golden brown and crispy on the other side, about 5 minutes more. Repeat cooking process with remaining batter.