This study investigates the synergistic effect of electrokinetic phenomena and viscoelastic nanofluids (Fe3O4 nanoparticles in H2O) in microfluidic channels having a porous medium. The current framework focuses on pressure-driven flow and analyses streaming potential under Lorentz force, Hall current, ion slip, and transient flow. The available literature shows no prior analysis for streaming potential pressure-driven unsteady flow for the Maxwell fluid model, the requirement for actual flow, heat transfer, and thermal irreversibility in microfluidic sustainability. Employing multi-objective optimization with a non-dominated gray wolf optimizer algorithm (NSGWOA) and non-dominated sorting genetic algorithm (NSGA-II), this study optimizes electroviscous heat transfer rate and entropy production using a Pareto-optimal solution. Five decision variables, including relaxation time, Hall current, ion slip, nanofluid volume fractions, and Hartmann number, were considered to achieve a Pareto-optimal solution. Results show a 1.92% reduction in streaming current with 2% nanoparticles and a promising 809.91% increase in electrokinetic energy conversion efficiency for slip-dependent zeta potential compared to slip-independent zeta potential. This study also compares two machine learning methods: artificial neural networks (ANN) and adaptive neuro-fuzzy inference systems (ANFIS). The results show that ANFIS provides more accurate predictions than ANN by minimizing the mean absolute percentage error. Decision making approach is employed to identify an acceptable optimal solution based on the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS). The optimization efforts resulted in a remarkable 128% efficiency gain in electroviscous heat transfer rate and a substantial 82.5% reduction in the overall entropy generation.