Pope Francis said on Sunday that political leaders who want walls and other barriers to keep migrants out “will end up becoming prisoners of the walls they build”.