Heat the oven to 350°F. Warm the oil in a Dutch oven over medium heat, then cook the onion and salt for 6 minutes until soft and translucent, adding the garlic for the last 30 seconds.
Stir in the ketchup, molasses, brown sugar, vinegar, mustard, paprika, pepper, and water, then simmer gently for 4 minutes until darker and smooth.
Fold in the rinsed beans, cover the pot, and place it on the lower oven rack.
Bake covered for 40 minutes, stirring once at the halfway point.
Uncover and bake 20 minutes more, stirring twice, until the sauce is thick, glossy, and clings to a spoon.