Heat oil in a heavy-bottomed pot over medium heat and cook 2 chopped onions until soft and translucent, about 5 minutes. Add pork and cook until lightly browned, about 5 minutes. Add about 1/4 cup water, tomato paste, paprika, 1/2 teaspoon caraway seeds, and salt; simmer until most of the liquid has evaporated and meat is cooked through, about 1 hour.
Sprinkle flour over goulash and add remaining 3/4 cup water to create a thick sauce. Simmer for another 10 minutes.
Heat butter in a saucepan over medium heat while pork is simmering. Cook 1 chopped onion until soft and translucent, about 5 minutes. Add sauerkraut, 1/2 cup water, and 1/2 teaspoon caraway seeds. Cover and simmer, stirring occasionally, until sauerkraut is heated through and flavorful, about 20 minutes. Season with salt. Drain off some of the cooking liquid.