In a medium saucepan, heat the oil over medium-high heat. When the oil is shimmering, add the onion and salt, and reduce the heat to medium-low. Cook until the onion is translucent, about 15 minutes, stirring often to prevent burning. Stir in the bell pepper and cook until the onion is pale golden and very soft and the pepper is tender, about 15 minutes more. When it is ready, the onion will fall apart in your fingers. Give it time.
Add the tomato sauce, increase the heat to medium-high, and bring to a boil. Reduce the heat to low and simmer gently for 1½ hours, stirring occasionally. You should see only a few bubbles here and there as the sauce cooks. The sofregit is finished when it concentrates to a thick, chunky texture and falls from a spoon in one dollop.
To store, spoon the sofregit into ice cube trays in 2-tablespoon portions. Freeze until solid, then transfer to freezer bags, squeeze out all the air, and seal. Store for up to 3 months. Thaw before using or add directly to the pan for dishes that will be simmering.