http://www.scborromeo.org/ccc/p3s2c2a4.htm#2241
2241 "Political authorities, for the sake of the common good for which they are responsible, may make the exercise of the right to immigrate subject to various juridical conditions, especially with regard to the immigrants' duties toward their country of adoption. Immigrants are obliged to respect with gratitude the material and spiritual heritage of the country that receives them, to obey its laws and to assist in carrying civic burdens."
`
http://www.scborromeo.org/ccc/p3s2c2a5.htm#2310
2310 Public authorities, in this case, have the right and duty to impose on citizens the obligations necessary for national defense.
Those who are sworn to serve their country in the armed forces are servants of the security and freedom of nations. If they carry out their duty honorably, they truly contribute to the common good of the nation and the maintenance of peace.
Clearly, the doctrines of the Church strongly favor non-violent (political, economic, diplomatic) means over violent ones, and peacemaking over warmaking. However, law enforcement and national defense are never anathematized; to the contrary, they are recognized as contributing to the common good.
Note the ongoing problem we have with clergy ignoring the Catechism. Or, to put it another way, Catholic leadership being out of line with Catholic law.
As the bible says, “I am for peace, but they are for war.”
But that sounds like a pretty common sense way of looking at things. It doesn’t automatically endorse every measure that could possibly be taken (e.g. we generally don’t shoot unarmed intruders on forbidden land on sight) but does endorse taking some measures towards the end of securing the integrity of a country. The whole reason for a wall, if we reference Donald Trump’s vision, is to be able to put what he called “a big beautiful door” in that wall. If nobody can be vetted on the way in, if nobody can be warned about what the rules of the road will be and allowed to either leave and go their way or else assent, then we have an unsustainable chaos.
And the unsustainable chaos would understandably sour an entire everyman population on the idea of letting anybody in at all. A good wall is a must in order to have a good door.