This is probably the most time-intensive part of the recipe, so I recommend you make the onions beforehand. They'll keep for a week or more in the fridge in a tupperware container. Start by heating the oil in a 10 or 12-inch cast iron skillet over medium-high heat until the oil is very, very hot but not smoking. Add the onions to the pan — they will be piled up high, probably to the rim, and let them cook undisturbed for 2 to 3 minutes.
Carefully toss the onions and, while doing so, season them with the salt. Now you've got 50 or so minutes of onion cookery ahead of you. For the first 15 minutes, you want the onions at the bottom of the pan to be slowly but steadily taking on color as they sweat out their liquid. The onions above them are helping this happen with their weight and gently pressing down the onions below. Do NOT press down on the onions with a spatula to try and speed up this process. Just turn the whole pile of onions over on itself every 3 or 4 minutes so that the same onions don't keep on cooking.
After the mass of onions in the pan has significantly reduced in volume, turn the heat to medium-low and stir and turn the onions every 10 minutes or so to make sure that they don't start to stick or burn at any point. Slow and steady wins the race — you want the onions to soften and sweeten, but not to dry out. This should take around 50 minutes. The onions will be ready when they are sweet with a deep roasted flavor and texture that's almost mushy, but not quite. Use them straightaway, or let them cool and store to use at a later time.