One way to do this is by essentially steaming the onions by adding water to the pan at medium-high heat and covering it when you see bubbles in the water.
When the veggies are soft, take the lid off to stir to let the water evaporate. Another option is to add water to an uncovered pan every time the onions seem close to burning.
You’ll need to watch the onions closely. Each time water is added, scrape any brown bits off the bottom of your pan to avoid charred flavor making it into your final product.