Optimization of heat exchangers (HEXs) is crucial to enhancing maximum power and reducing the backpressure introduced by automobile exhaust thermoelectric generators (AETEGs). However, existing HEX optimization methods usually set several parameters artificially for numerical comparison to find the best structure, which cannot achieve global optimization and lacks the theoretical guidance for optimal design. In this work, a lowbackpressure ortho-octagonal AETEG system was developed, its performance was investigated with a fluidthermal-electric coupling model and fitted with a Gaussian process regression (GPR) surrogate model, and the average hot side temperatures, temperature uniformity, and backpressure were considered to establish an invehicle compatibility performance optimization index. Finally, the fin length, fin height, arc radius, and tailend angle of the polygonal HEX were optimized with a crested porcupine optimizer (CPO). Results indicate that the optimal fin length is 178.28 mm, fin height is 45.93 mm, arc radius is 306.46 mm, and tail end angle is 7.98 degrees, respectively. Compared with the original AETEG system at a flow rate of 40 m/s, the peak power and conversion efficiency concerning the CPO-optimized AETEG system are decreased by 3.54 % and 4.08 %, while the net power and net conversion efficiency are increased by 6.75 % and 7.06 %, respectively. Besides, the CPOoptimized AETEG system outperforms the whale optimization algorithm (WOA)-optimized one for it voids the local optimal solution, and the proposed performance optimization index is enhanced by 1.15 %. The suggested optimization approach offers new insights into the structure optimization of the AETEG system for automotive applications by considering in-vehicle compatibility.