Since data transmission time is difficult to predict due to the uncertain delay of 5G communication, the fault response timeliness and decision-making accuracy of a feeder automation (FA) system are affected. Thus, a distribution network FA switching method based on 5G communication delay is proposed. Initially, the topological relationship between feeder terminals is established, and the real-time communication delay of the FA system is calculated based on the maximum communication delay in each branch of the FA system. Subsequently, a stacked Long Short-Term Memory (LSTM) neural network model is trained by the historical data of fault processing time under different FA strategies and various delays, to obtain the FA strategies with the fastest fault handling speed under different communication delays. Finally, based on the learning outcomes of the layer-stacked LSTM model, the FA strategy with the shortest fault handling time under a certain communication delay is selected. Experimental results demonstrate that the proposed method effectively mitigates the impact of uncertain delays in 5G communication on FA systems, ensuring their reliable operation. Moreover, compared to other machine learning methods, the layer-stacked LSTM model shows advantages in prediction accuracy and prediction delay, effectively enhancing the adaptive capacity and fault response speed of feeder terminals.