Preheat the oven to 300 degrees F (150 degrees C). Line a rimmed baking sheet with parchment paper. Toss tomatoes, 4 tablespoons olive oil, garlic, 1/4 teaspoon salt, and pepper together in a medium bowl. Place tomatoes cut-side up in a single layer on the prepared baking sheet. Bake in the preheated oven until soft and juicy, about 2 hours. Remove from the oven. Increase oven temperature to 400 degrees F (200 degrees C). Sprinkle remaining 1 teaspoon salt, sugar, Italian seasoning, rosemary, basil, parsley, garlic powder, onion powder, and red pepper flakes evenly over the tomatoes. Drizzle tops of tomatoes with remaining 1 tablespoon olive oil. Return baking sheet to the oven and bake for an additional 20 minutes. Heat a frying pan over medium heat. Cook sausage and onion until sausage is no longer pink and onion softens, about 7 minutes. Remove from heat and set aside. Transfer roasted tomatoes and any juices to a food processor. Process to desired consistency. Add ricotta and Parmesan cheeses and pulse to combine. Pour tomato sauce into a bowl; mix in sausage-onion mixture.