In the pursuit of achieving a harmonious equilibrium between electricity production and consumption, the integration of distribution generators (DG) has garnered substantial attention. Yet, the escalated integration of DG systems has given rise to the predicament of reverse power flow, instigating elevated system power losses and voltage profile distortions. Thus, an imperative emerges to judiciously apportion and dimension DG systems, complemented by the incorporation of battery energy storage (BES) systems, as a remedial measure against these challenges. In this scholarly work, we present an innovative approach rooted in a precise energy management strategy (EMS) aimed at the adept allocation and capacity optimization of (PVDG-BES) systems. The study employs a two-step optimization methodology, the former facet of which expounds on the influence of BES system integration on grid power losses and voltage profiles during stable operational conditions. Subsequently, a pioneering optimization technique is formulated in the latter facet to identify the optimal siting and capacity allocation of the aforementioned system based on an optimal EMS framework. The primary focal point of this investigation is the minimization of total power losses. Validation of our proposition is conducted on the IEEE 14-bus standard system, incorporating the particle swarm optimization (PSO) algorithm. Simulation outcomes incontrovertibly affirm the efficacy and robustness of the proposed EMS, yielding substantive reductions in power losses and noteworthy enhancements in voltage profile integrity. Notably, the implementation of EMS leads to a remarkable 31% reduction in total power losses as compared to the initial scenario, prior to the amalgamation of PVDG-BES components. In sum, this study epitomizes a comprehensive strategy for fortifying power grid efficiency by orchestrating the symbiotic interplay of distribution generators and battery energy storage systems through an adept energy management paradigm.