Text this: Smart Charging and V2G: Enhancing a Hybrid Energy Storage System with Intelligent and Bidirectional EV Charging