In the present era dominated by Industry 4.0, the digital transformation and intelligent management of industrial systems is significantly important to enhance efficiency, quality, and the effective use of resources. This underscores the need for a framework that goes beyond merely boosting productivity and work quality, aiming for a net-zero impact from industrial activities. This research introduces a comprehensive and adaptable analytical framework intended to bridge existing gaps in research and technology within the manufacturing sector. It encompasses the essential stages of using artificial intelligence (AI) for modelling and optimizing manufacturing systems. The effectiveness of the proposed AI framework is evaluated through a case study on electric discharge machining (EDM), concentrating on optimizing the electrode wear rate (EWR) and overcut (OC) for aerospace alloy Inconel 617. Utilizing a comprehensive design of experiments, the process modelling through an artificial neural network (ANN) is carried out, accompanied by careful fine-tuning of hyperparameters throughout the training process. The trained models are further assessed using an external validation (Valext) dataset. The results of the sensitivity analysis indicated that the surfactant concentration (Sc) has the highest level of influence, accounting for 52.41% of the observed influence on the EWR, followed by the powder concentration (Cp) with a contribution of 33.14%, and the treatment variable with a contribution of 14.43%. Regarding OC, Sc holds the highest percentage significance at 72.67%, followed by Cp at 21.25%, and treatment at 6.06%. Additionally, parametric optimization (PO) shows that EWR and OC overcome experimental data by 47.05% and 85.00%, respectively, showcasing successful performance optimization with potential applications across diverse manufacturing systems.