Heat oil in a large, heavy stockpot on medium. Add onions and sprinkle with salt. Cook until softened and translucent, about 10 minutes.
Increase heat to medium-high and continue cooking, stirring often and scraping
The bottom of the pot, until onions are deep brown and caramelized, 40 to 50 min. If the bottom of the pot starts to get too dark, add 4 to 5 Tbsp water.
Sprinkle onions with flour and cognac and cook, stirring, about 2 more minutes. Add broth and herbs and simmer until reduced to about 8 cups, 18 to 20 min. Discard herbs and stir in vinegar.
When ready to serve, turn on your broiler. Place bread on a rimmed baking sheet and sprinkle with cheese. Broil on the top rack in the oven until cheese is golden brown and bubbling, about 2 minutes.
Ladle soup into bowls and top with cheesy toasts.