Tax enough to pay for the effort but not for a "profit". Build infrastructure by bringing outside expertise to train and build local business. Take control of schools, make them safe and required for all children. Respect the local culture but smash hard some cultural practices.
Would it be incredibly hard to do without abuse? Absolutely. Is it questionably moral? Absolutely. Could it even be done at all? Questionable.
We keep acting that the outcome of every military conflict is going to be like the liberation of France in WWII, kill the "bad guys" and then champagne and croissant parades with the locals.
The repeated failed attempts at just handing self-government to nations after we depose their governments shows that you can't just win wars and fix problems with force alone. War is awful, it should happen as infrequently as possible, but if you're going to do it, you better have a plan for winning the peace. Corrupt, half-assed nation building doesn't cut it.