The flexible job shop scheduling problem with parallel batch processing operation (FJSP_PBPO) in this study is motivated by real-world scenarios observed in electronic product testing workshops. This research aims to tackle the deficiency of effective methods, particularly global scheduling metaheuristics, for FJSP_PBPO. We establish an optimization model utilizing mixed-integer programming to minimize makespan and introduce an enhanced walrus optimization algorithm (WaOA) for efficiently solving the FJSP_PBPO. Key innovations of our approach include novel encoding, conversion, inverse conversion, and decoding schemes tailored to the constraints of FJSP_PBPO, a random optimal matching initialization (ROMI) strategy for generating diverse and high-quality initial solutions, as well as modifications to the original feeding, migration, and fleeing strategies of WaOA, along with the introduction of a novel gathering strategy. Our approach significantly improves solution quality and optimization efficiency for FJSP_PBPO, as demonstrated through comparative analysis with four enhanced WaOA variants, eleven state-of-the-art algorithms, and validation across 30 test instances and a real-world engineering case.