Looking at the datasheet of this component, can you group together pins by their functions? for example for Power, 3v3, gnd_1 gnd_2 etc
NOTE: If you group them, can you not add the same pin if you already added them in a group? You should know which pin function is common for its function
I grouped the STM32F405RGT6 LQFP64 pins so each physical pin appears exactly once, using power/ground/control/clock groups plus GPIO port groups to avoid duplicate alternate-function assignments. Full grouping is in STM32F405RGT6 Pin Function Groups.