Best made the day before - the filling settles overnight and the flavour deepens. If you're short on time, give yourself at least an hour for it to cool.
Boil the potatoes in salted water until very soft, drain well, then mash with a glug of oil and let them cool. By hand, not blender.
Chop the onion fine and fry slowly in oil until it softens and just starts to turn golden brown at the edges. You want sweetness, not crunch.
Pat the tofu dry and break it into a blender or food processor with the sauerkraut brine. Blitz until smooth and creamy - this is where the cheesy tang comes from. Taste; if you want it sharper, add another splash of brine.
Combine the mashed potato, blended tofu and the cooked onion in a bowl. Season generously with salt and pepper, taste, adjust. Cover and refrigerate.
Mix the flour with salt and oil, then add the hot water gradually, working it in until the dough comes together smooth and slightly tacky. You might need a touch more flour or water - feel for it. Knead briefly and rest covered for 15 minutes.
Roll the dough out thinly. Cut rounds with a glass (about 7cm). Spoon a teaspoon of filling onto each, fold and pinch the edges tightly so they don't open while cooking.
Boil a big pot of well-salted water. Cook the pierogi in batches; once they float, give them another minute and lift them out.
Serve hot. A scatter of more fried onion on top is lovely; a dollop of plant-based sour cream alongside is even better. They reheat in a pan with a little oil the next day.