Within microgrids (MGs), the integration of renewable energy resources (RERs), plug-in hybrid electric vehicles (PHEVs), combined heat and power (CHP) systems, demand response (DR) initiatives, and energy storage solutions poses intricate scheduling challenges. Coordinating these diverse components is pivotal for optimizing MG performance. This study presents an innovative stochastic framework to streamline energy management in MGs, covering proton exchange membrane fuel cell–CHP (PEMFC-CHP) units, RERs, PHEVs, and various storage methods. To tackle uncertainties in PHEV and RER models, we employ the robust Monte Carlo Simulation (MCS) technique. Challenges related to hydrogen storage strategies in PEMFC-CHP units are addressed through a customized mixed-integer nonlinear programming (MINLP) approach. The integration of intelligent charging protocols governing PHEV charging dynamics is emphasized. Our primary goal centers on maximizing market profits, serving as the foundation for our optimization endeavors. At the heart of our approach is the Meerkat Optimization Algorithm (MOA), unraveling optimal MG operation amidst the intermittent nature of uncertain parameters. To amplify its exploratory capabilities and expedite global optima discovery, we enhance the MOA algorithm. The revised summary commences by outlining the overall goal and core algorithm, followed by a detailed explanation of optimization points for each MG component. Rigorous validation is executed using a conventional test system across diverse planning horizons. A comprehensive comparative analysis spanning varied scenarios establishes our proposed method as a benchmark against existing alternatives.