>>13556943When a pokeball captures something, it embeds some kind of tag onto it's cells that registers that pokemon to that pokeball, unless released via PC. Thus, it is impossible to capture an already owned pokemon, or one that escaped it's ball somehow. However, in the Orre region someone invented a machine that transforms pokeballs into special ones that can hack into the pokemon's DNA and remove that tag from it and/or reprogram it to the transformed pokeball, thus making it even harder for pokemon trainers there as Orre has so few native pokemon. However after that organization's downfall scientists not only reworked, but upgraded the machine to identify pokemon down to a spiritual level as well as making the machine debatably more potent. Then, once it was finally functional, it was stolen and upgraded yet again in order to be mass produced, though this project never saw the light of day.
TL;DR: The system has already been hacked once, it can be done again.