Temporary works are necessary to ensure the construction and operation of railways. These works are characterized by their large scale, numerous locations, and long construction periods. However, suitable land resources for such purposes are extremely limited in mountainous railway areas. Additionally, the selection of sites for these works often overlaps with areas affected by debris flow, leading to high potential risks from geological disasters. Taking the Jinjia Gully watershed as an example, this paper explores a method for assessing debris flow risks in single gullies, including the zoning of debris flow danger areas, vulnerability analysis, and risk assessment. Based on the data obtained from field surveys, they utilize ArcGIS and the Analytic Hierarchy Process (AHP), combined with numerical simulations and indoor experiments, to establish a quantitative risk assessment method for large-scale temporary works. The results indicate that (1) the area of debris flow hazard zones decreases with increasing rainfall frequency, and (2) the vulnerability assessment model can not only reflect the types of individual work, structural materials, and construction quality but also the shielding effect of building clusters. In the direction of flow, the shielding effect range of buildings on debris flow accumulation fans is approximately 37.5 times the size of the buildings. In the direction of extension, when the angle between current and rear buildings exceeds 0.674 radians, the shielding effect can be neglected. (3) At a rainfall frequency of p = 5%, more than 80% of large-scale temporary works are in extremely low or low-risk zones, indicating that the study area is at a low risk level.