You've just made a good case for why doctrine needs to evolve. You are quite right that the Church at one time endorsed slavery. That endorsement came from a simplistic interpretation of Scripture (Col. 3:22), which goes to my point about the importance of not taking biblical passages at face value. The fact that we no longer feel that way is evidence to me of the ongoing presence of the Holy Spirit.

You are free to disagree with the pope's stance on immigration. Truth be told, I'm not sure I fully agree with him. But what we aren't free to do (at least, not if we consider ourselves Christian in more than a cosmetic sense) is ignore the plight of others. We must care. How that care is manifested is a matter for prayerful discernment and informed individual conscience.