> People are generally in agreement against lower wages and higher property prices

Neither of those are economic policies. People are very much in agreement that they want cheap goods, high wages, high property values, low housing costs, walkable neighborhoods, and free parking despite many of those things being in direct opposition to one another or even completely contradictory. You can't just say "people universally want this obviously good thing, therefore we should ignore everything else in order to achieve that one goal".

Businesses in a competitive market don't "extract wealth", they create it. When I buy something from Walmart it makes both me and Walmart wealthier, because I value the thing I bought more than the money I spent to buy it, and they value my money more than the product sitting in their inventory. When I work for Walmart it makes both me and Walmart wealthier, because they value my labor more than the money they spent to employ me, and I value the money they're paying me more than the time I spent to make it.

What creates poverty isn't "wealth extraction", it's market inefficiency. When you artificially pull money out of the market through taxes and waste it on something worth less than the money itself is (which unlike private individuals or businesses you as the government can afford to do indefinitely, because you didn't earn that money through a voluntary transaction, you took it by force) that results in wealth being destroyed rather than created.

Are markets perfect? No. Markets are a stochastic system so there will obviously be inefficiencies at the margins. Markets also don't work when there's no competition, and they are only concerned with efficiency, not loftier ideals like morality and compassion. But so far creating wealth is concerned, markets are unmatched.

Since you seem concerned with the "long-term economics of a community" rather than the long-term economics of the world as a whole though, things are a little more complicated. Saying that we should favor local businesses over businesses foreign to the community because we want to avoid sending money out of the community is essentially the same argument made by those in favor of tariffs at the national level; that even if free trade is more efficient as a whole it's not in the local community's best interest for it to be importing more goods than it's exporting. There's some truth to this; spending more than you make isn't sustainable long term. But I don't think artificial barriers to trade are a good solution to this problem; you need to address the underlying cause of your community/country's exports being unable to compete in the wider market.

Note also that retail businesses in a local community are not a closed system regardless of whether the business itself is local or foreign to the community. If I buy $20 of goods from Mom and Pop's general store, they probably still had to buy those goods from somewhere outside the community. The fact that the retail business itself is local doesn't really change that; there's still wealth flowing out of the community which has to be replaced by something of equivalent value being exported; otherwise the community will be unable to sustain itself long term.