The transition from traditional fuel-dependent energy systems to renewable energy-based systems has been extensively embraced worldwide. Demand-side flexibility is essential to support the power grid with carbon-free generation (e.g., solar, wind.) in an intermittent nature. As extensive energy consumers, commercial and industrial (C&I) consumers can play a key role by extending their flexibility and participating in demand response. Onsite renewable generation by consumers can reduce the consumption from the grid, while energy storage systems (ESSs) can support variable generation and shift demand by storing energy for later use. Both technologies can increase the flexibility and benefit by integrating with the demand response. However, a lack of knowledge about the applicability of increasing flexibility hinders the active participation of C&I consumers in demand response programs. This survey paper provides an overview of demand response and energy storage systems in this context following a methodology of a step-by-step literature review covering the period from 2013 to 2023. The literature review focuses on the application of energy storage systems and onsite renewable generation integrated with demand response for C&I consumers and is presented with an extensive analysis. This survey also examines the demand response participation and potential of wastewater treatment plants. The extended research on the wastewater treatment plant identifies the potential opportunities of coupling biogas with PV, extracting the thermal energy and onsite hydrogen production. Finally, the survey analysis is summarised, followed by critical recommendations for future research.