The current state of the use of methods of stopping wagons on railway transport in cases of their spontaneous departure is investigated. As a result, it was found that cases of spontaneous departure of rolling stock on railways in the region of the Republic of Uzbekistan account for 4.2% of the total share of traffic safety violations and account for 19.9% of the damage caused. This article highlights that in order to prevent the above situations, after installing brake shoes through automatic braking, a device on a spontaneously departing rolling stock, taking into account the number of wagons and their state of loading, based on the development of a mathematical model for determining the stopping distance, a system operating without a human factor was created and introduced into production.