I recently read a great article on Urbanophile that touches this issue (not from an individual investor standpoint, but a wider lens):
http://www.urbanophile.com/2013/02/03/is-urbanism-...
Many investors like to puff out their chests and talk about how they are helping their neighborhoods and I don't disagree with them, actually. But there is a ton of nuance that they gloss over because it is convenient. It stands to reason that if you improve an area, even just by NOT being a slumlord in some cases, market prices will and should go up. So, like you said, it is really tricky.
However, one possible idea is to focus on creating NEW inventory (in your case, buying lots and building new houses in your neighborhood). Creating more supply should, in theory, temper rising costs in an area. Population density can be a good thing in this regard (a lot of YIMBY groups are big proponents of increasing density). And depending on your cost structure and market, I imagine there is still money to be made.
Of course, with population density, you get a ton of push back from current homeowners who don't want new inventory because they want to see their own property values stay high and generally, people dislike change. If you are just buying lots and building SFHs, I don't think anyone will raise a stink. But, if you want to help your community, you could voice your opinion on these issues through your city government as one way to be an active participant.
I sort of threw out a bunch of disjointed ideas, but hopefully some tidbits to think about as you move forward!