This paper aims to investigate the impact of optimal planning of renewable energy systems and independent battery energy storage systems (BESS) on the performance and reliability of distribution systems (DS). A unique energy management scheme (EMS) controls the charging and discharging schedules of the BESS. The transit search optimization (TSO) algorithm determines the optimal allocation of wind turbine (WT) and solar photovoltaic (SPV) generator units, along with BESS units. The optimization focuses on improving the DS reliability in terms of energy supply, increasing the feeder security margin, and reducing apparent power loss. Multiple case studies are designed to study the efficacy of the problem outcomes and are validated using Bus 4 of the Roy Bollington Test System (RBTS). To obtain results that are close to actual operating conditions, the modelling process takes into account the time-varying load profile and the dynamic power outputs from the SPV and WT units. The findings show that the suggested method works well by enhancing the feeder security margin by a maximum of 11.25%, reducing expected energy not supplied (EENS) by 4.3%, and improving the power loss profile by 11.5%. In addition, the feeder upgrade deferral (FUD) years also show a maximum improvement of 20.8%.