With the rapid increase in the number of electric vehicles, the safety and stability issues of electric vehicle charging equipment are becoming increasingly prominent. The failure of charging equipment not only affects the user experience but may also lead to economic losses and safety hazards. The development of efficient and accurate charging pile fault detection algorithms is of great significance. Based on this, this paper proposes a dynamic self-distillation transformer for fault detection of charging piles with limited features. The method first reconstructs the limited features through permutation and combination, effectively increasing the representation ability of the input features. Then, the transformer network is used for feature extraction of the new features. To reduce the complexity of model deployment, this paper designs a dynamic self-distillation method to compress the knowledge of deeper transformer networks into shallower networks, effectively enhancing the detection performance of the shallower network. Experiments conducted on real datasets have proven that this method achieves higher fault detection accuracy than existing advanced models. It also demonstrates that the dynamic knowledge distillation strategy can not only reduce computational power for deployment but also better learn the knowledge of deeper networks to improve the detection accuracy of the model.