China’s rapid economic growth in recent years narrowed the wealth gap, but so did investment losses among the affluent.