Mix spareribs, wine, and five-spice powder in a bowl. Cover with plastic wrap and refrigerate overnight.
The next day, drain ribs, discarding liquid, and transfer to a 6 qt saucepan. Cover with water by 2 inches and bring to a boil. Reduce heat to medium; cook until slightly tender, 3–5 minutes, and drain. Set aside.
Heat 1/4 cup canola oil in a 14 inch flat-bottomed wok or frying pan over medium-high heat. Add sliced garlic and ginger, dried chiles, fennel, star anise, and cinnamon; cook until fragrant, 1–2 minutes.
Using a slotted spoon, transfer spices and chiles to a piece of cheesecloth; tie into a tight package. Add package to wok with reserved ribs, sugar, salt, and 6 cups water; bring to a boil.
Reduce heat to medium; cook until ribs are very tender, 30–35 minutes. Drain ribs, discarding liquid and spice package, and dry them completely with paper towels; set aside.
Dry wok with paper towels and heat remaining 3 cups of canola oil to 375 degrees F. Working in 2 batches, fry ribs until crisp, 6–8 minutes. Using a slotted spoon, transfer to paper towels to drain; set aside.
Discard all but 1/4 cup oil; heat over high heat. Add minced garlic and ginger, and red and green chiles; cook until fragrant, about 1 minute. Add ribs and red chile oil; cook for 1 minute more. Serve with rice.