In a medium skillet over medium heat, melt butter. Add corn and onion; cook, stirring occasionally, until onion softens, 8 to 10 minutes. Remove from heat; cool.
In a large bowl, combine flour, baking powder, salt, pepper, and red pepper. In a medium bowl, whisk together milk and eggs. Gradually whisk milk mixture into flour mixture just until smooth. Stir in corn mixture and crabmeat. Cover and refrigerate 10 minutes.
Meanwhile, add enough oil to a large, heavy skillet so it reaches 1/4 inch deep; heat over medium-high heat. Carefully drop 6 to 8 mounds of batter by level tablespoon into hot oil. Cook until golden brown, about 1 minute per side. Transfer fritters to paper towels; keep warm in oven. Repeat with remaining batter. Serve with garlic aioli.