1. Combine flour and 2½ cups room-temperature water in the bowl of a stand mixer fitted with the dough hook. Mix on low speed, scraping down sides and hook as needed to incorporate any dry flour, until a shaggy dough forms. Remove dough hook and cover bowl with plastic. Let sit while you prepare the yeast (you can leave the dough in this state up to 2 hours).
2. Stir yeast, sugar, and ½ cup warm water with a fork in a small bowl to dissolve. Let sit until yeast is foamy, about 5 minutes.
3. Pour yeast mixture into stand mixer bowl and mix on low speed until dough absorbs all additional water, about 1 minute (pulse mixer on and off a couple of times at very beginning to prevent liquid from splashing over the sides). Add kosher salt and continue to mix, increasing speed to medium, until dough is extremely elastic and very sticky (it will look more like a thick batter and will stick to sides of bowl), about 5 minutes.
4. Pour 3 Tbsp. oil into a large (preferably glass) bowl and swirl to coat sides. Scrape in dough with a large spatula or flexible bench scraper. Cover and place in a warm spot until dough is doubled in volume, 2–3 hours. If using a glass bowl, it’s helpful to mark the position of the dough at the beginning so you can accurately assess the rise (a dry-erase marker or piece of tape works).
5. Drizzle 2 Tbsp. oil over a 18x13" sheet pan and use fingertips to rub all over bottom and sides. Using large spatula or flexible bench scraper, fold dough inside bowl a couple of times to deflate, then scrape onto prepared baking sheet. Using oiled hands, lift up dough and fold over onto itself in half, then rotate baking sheet 90° and fold in half again. Cover dough with a piece of well-oiled plastic and let rest 10 minutes to let gluten relax.
6. Uncover and go back in with oiled hands, gently stretching dough (to avoid tearing) across length and width of baking sheet in an even layer, working all the way to edges and into corners. If dough starts to spring back, let sit 5–10 minutes and start again. Cover again with same piece of oiled plastic and chill at least 8 hours and up to 24.
7. Let sheet pan sit in a warm spot until dough is puffed and bubbly and nearly doubled in height, 45–65 minutes (if you’re using a standard half sheet pan, it will have risen to the very top of the sides). Meanwhile, place a rack in center of oven; preheat to 450°.
8. Remove plastic and drizzle dough generously with more oil. Oil hands again and press fingertips firmly into dough, pushing down all the way to bottom of pan to dimple all over. Sprinkle generously with sea salt, rosemary, and sliced onions.
9. Bake focaccia until surface is deep golden brown all over, 30–40 minutes. Let cool in pan 10 minutes. Slide a thin metal spatula underneath focaccia to loosen from sheet pan (it may stick in a couple of places, so use some elbow grease to get underneath) and transfer to a wire rack. Let cool completely before cutting as desired.