I've always been told that the key to a country's general success is to have a middle class. The most successful countries have the largest middle class, with minorities (numerically) at the wealthiest and poorest ends.
It may be nice for the rich to be charitable, but that isn't the key thing -- no one buys their way into heaven.
I would say it is much more in line with Church teaching to have the poor behave in a Godly manner which will help them and their families rise up through renouncing sinful behavior.
Problem is when there are MORE rich/poor folks, with either FEW or NO middle class.