Thermal Energy Storage (TES) plays a pivotal role in the fire protection of Li-ion batteries, especially for the high-voltage (HV) battery systems in Electrical Vehicles (EVs). This study covers the application of TES in mitigating thermal runaway risks during different battery charging/discharging conditions known as Vehicle-to-grid (V2G) and Grid-to-vehicle (G2V). Through controlled simulations in Simulink, this research models real-world scenarios to analyze the effectiveness of TES in controlling battery conditions under various environmental conditions. This study also integrates Machine Learning (ML) techniques to utilize the produced data by the simulation model and to predict any probable thermal spikes and enhance the system reliability, focusing on crucial factors like battery temperature, current, or State of charge (SoC). Feature engineering is also employed to identify the key parameters among all features that are considered for this study. For a broad comparison among different models, three different ML techniques, logistic regression, support vector machine (SVM), and Naïve Bayes, have been used alongside their hybrid combination to determine the most accurate one for the related topic. This study concludes that SoC is the most significant factor affecting thermal management while grid power consumption has the least impact. Additionally, the findings demonstrate that logistic regression outperforms other methods, with the improving feature to be used in the hybrid models as it can increase their efficiency due to its linearity capture capability.