Improvements to the current generation and distribution of electricity via demand side management (DSM) and storage systems are prevalent facing increasing energy demand and environmental implications of electricity generation. In this paper, a multi-level optimization model, which incorporates energy demand scheduler (DS), energy storage (ES) and solar photovoltaic (PV) panels amongst households, was developed so as to lower the peak-to-average ratio (PAR) of energy demand and reduce electricity bills. This model consists of three levels: (1) household consumption optimization (solo opt) using convex programming, (2) grid consumption optimization (base opt) via a game-theoretic framework, and (3) ES/PV allocation optimization using genetic algorithm (GA opt). This framework searches for the optimal allocation of ES/PV in a heterogeneous residential population subdivided into consumer groups by household sizes and income levels. A case study was performed with model parameters determined by referencing state-averaged electricity bills and electricity usage data from Texas, US. The results showed that GA opt can achieve bills savings of ~11% and a PAR reduction from 1.53 to 1.30 by allocating a non-trivial optimal combination of ES/PVs to the households. Another GA opt approach was adopted by minimizing PAR and found that PAR can be effectively reduced from 1.53 to 1.00 with bills savings of ~4%. Most significantly, it was observed that the optimal allocation differs from the free market equilibrium due to positive externalities and synergies when combining DSM together with ES/PVs.