This paper introduces an automatic, powerful and easy to use procedure for undertaking stability analyses of leaning historic masonry structures, based on an upper bound finite element limit analysis (FELA) approach. The procedure proposed here consists of a comprehensive workflow which involves the automatic point cloud manipulation, the 3D mesh generation of the actual geometry for structural purposes (e.g. FE mesh), and a two-step FELA that reduces drastically optimization variables assuming only active few elements inside a restricted processing zone. To generalize the Heyman's intuition to complex real geometries, the use of a 3D upper bound FELA with a recursive kernel of variables reduction becomes necessary for a precise evaluation of the limit inclination that makes the structure collapse under gravity loads. This outcome permits to estimate the structural health condition of a historic structure by comparing the critical inclination angle with the actual one. To demonstrate the effectiveness of the automated procedure, the southwest leaning tower of the Caerphilly castle (Wales, UK) is investigated and failure mechanisms with collapse inclination angles are evaluated through FELA. The proposed procedure presents a high degree of automation at each operational level and, hence, could be effectively used to assess the stability of historic structures at a national scale and provide useful information to asset owners to classify the structural health condition of leaning historic masonry structures in their care.