Dry and season the shrimp: pat the shrimp very dry with paper towels. Toss with 1/2 teaspoon of the salt and let sit 5 minutes. Sprinkle the cornstarch over and toss until every shrimp looks evenly, lightly dusty; shake off thick clumps.
Toast the seasoning mix: in a small dry skillet over medium heat, combine the remaining 3/4 teaspoon salt, black pepper, white pepper, sugar, and five-spice if using. Toast, stirring constantly, 30 to 45 seconds until fragrant. Tip into a small bowl.
Fry the shrimp: heat the oil in a wok or large heavy skillet over high heat until shimmering, around 375F (190C). Working in two batches, fry shrimp in a single layer 1 1/2 to 2 minutes per side until shells are crisp, bright coral, and meat is just opaque. Transfer to a plate or rack and let oil return to temperature between batches.
Bloom the aromatics: pour off all but 1 tablespoon oil. Return the wok to medium-high heat, add garlic, chilies, and scallion whites, and stir-fry 30 to 45 seconds until garlic is pale gold at the edges.
Toss everything together: return all shrimp to the wok, sprinkle the toasted salt-and-pepper mix over, and toss vigorously 20 to 30 seconds until speckled and glossy. Fold in scallion greens and toss once more.
Serve right away with lemon wedges, as-is for peeling at the table or over jasmine rice.