This paper explores the potential of local energy market (LEM) for optimising energy management in residential communities, focusing on the rise of rooftop solar photovoltaic (PV) systems and electric vehicles (EVs) in New Zealand. A mixed-integer linear programming (MILP) based optimisation model is developed to minimize operation costs and temperature deviation of household hot water cylinders (HWCs) within the LEM framework. For this, a detailed modelling of flexible devices within the LV distribution network is implemented. The study considers various scenarios with different penetration levels of rooftop PV systems and EVs to assess the impact of local energy trading on distribution networks. Real-time load data, market prices, and statistical models are utilized for numerical simulations. Results from numerical simulations demonstrate that LEM significantly reduces operational costs compared to traditional Home Energy Management Systems (HEMS). However, the presence of storage devices can lead to increased peak grid import in LEMs. The sensitivity analysis further revealed that the LEM based model has fewer scenarios with reverse power flow. The findings from this study highlighted the need of appropriate energy management strategies for storage devices within LEMs to mitigate grid overloading and to facilitate the increased integration of EVs and PVs in distribution networks.