Preheat your oven to 350°F (175°C).
In a large skillet over medium-high heat, brown the ground beef, breaking it into small crumbles as it cooks. When the meat is about 75% cooked (after approximately 5 minutes), add the diced onion and continue cooking until the onion becomes translucent and the beef is no longer pink.
Add the minced garlic during the last minute of cooking, stirring constantly to prevent burning.
In a large mixing bowl, combine all four varieties of beans. Drain and rinse three of the bean varieties (kidney, butter, and pinto), but leave the baked beans with their sauce.
In a separate medium bowl, whisk together the ketchup, brown sugar, mustard, apple cider vinegar, Worcestershire sauce, salt, pepper, and cayenne (if using). Let this mixture sit for 5 minutes to allow the ingredients to meld.
Add the browned meat mixture and sauce to your bean combination. Gently fold everything together using a rubber spatula or wooden spoon, being careful not to mash the beans.
Transfer the mixture to a greased 9×13-inch baking dish, spreading it evenly. Layer the partially cooked bacon pieces across the top.
Cover the baking dish with aluminum foil and bake for 40 minutes. Then remove the foil and bake for an additional 15-20 minutes until the top is slightly caramelized and the bacon is crispy.
Allow to rest for 5 minutes before serving.