This paper presents a capacity planning framework for a microgrid based on renewable energy sources and supported by a hybrid battery energy storage system which is composed of three different battery types, including lithium-ion (Li-ion), lead acid (LA), and second-life Li-ion batteries for supplying electric vehicle (EV) charging stations. The objective of this framework is to determine the optimal size for the wind generation systems, PV generation systems, and hybrid battery energy storage systems (HBESS) with the least cost. The framework is formulated as a mixed integer linear programming (MILP) problem, which incorporates constraints for battery ageing and the amount of unmet load for each year. The system uncertainties are managed by conducting the studies for various scenarios, generated and reduced by generative adversarial networks (GAN) and the k-means clustering algorithm for wind speed, global horizontal irradiation, and EV charging load. The studies are conducted for three levels of unmet load, and the outputs are compared for these reliability levels. The results indicate that the cost of hybrid energy storage is lower than individual battery technologies (21% compared to Li-ion, 4.6% compared to LA, and 6% compared to second-life Li-ion batteries). Additionally, by using HBESS, the capacity fade of LA batteries is decreased (for the unmet load levels of 0, 1%, 5%, 4.2%, 6.1%, and 9.7%, respectively), and the replacement of the system is deferred proportional to the degradation reduction.