Cut 2 onions into large pieces and place in a large pot with the herbs, 5 peppercorns, 1 bay leaf, and a pinch of salt. Set aside.
Cut the 4 ribs into pieces approximately 7-10 cm long.
Rub both sides of each rib piece with salt, ground pepper, and paprika powder.
Heat some oil in a pan over medium-high heat. Sear the rib pieces for 2 minutes on each side until browned.
Transfer the seared ribs to the pot with the onions and herbs. Layer them in.
Pour water into the pot until it reaches 1 cm above the ribs. Bring to a boil over high heat, then reduce to medium-low and simmer for about 1 hour until the meat easily separates from the bone (pork internal temperature should reach 63°C / 145°F).
While the ribs cook, prepare the sauerkraut: Cut the 50 g white bacon into small cubes.
Heat a separate pan over medium heat. Sauté the bacon for 3-4 minutes until the fat renders and becomes translucent.
Cut 1 onion into small cubes and add to the bacon. Cook for 4-5 minutes, stirring occasionally, until both are light brown.
Add the 500 g sauerkraut to the pan. Pour in enough water to prevent sticking. Add 1 bay leaf, 3 juniper berries, 2 allspice berries, and a pinch of salt.
Simmer over medium-low heat for 10-15 minutes. At the 5-minute mark, stir in 1 tablespoon of sugar.
Peel and finely grate 1 small potato. In the final 1-2 minutes of cooking, quickly stir the grated potato into the sauerkraut (optional—helps lightly thicken the dish).
Serve the boiled ribs with the sauerkraut mixture.