This is not good advice. Manually altering the stats to all 31 using the batch editor will not work for Pokémon with a PIDIV correlation, which many encounters from Gen 3 and Gen 8 have. Editing them in this way without recalculating the PID (and potentially Height/Weight, EC, Nature, Gender, etc.) will cause it to become illegal. However, if they are Raid Den, Max Lair, or Legends Arceus wild encounters, PKHeX will not flag them despite them being illegal, which is worse because then you can't tell you've made an error without additional effort to reverse the seed.
Please disregard the advice to just "set them all to 6IV" and use the guides below: