I'd go with quantum mechanics here. More likely an "entropy mark" attached to the body of the Pokémon in question. It has some advantages: it modifies the Pokémon in an unique way, thus ensuring that no "legal" Poké Ball can catch an already owned Pokémon. Only wild Pokémon would be untagged and thus catchable. The “quantum label” may contain a signature that links all Pokémon owned by the same trainer, which would work as a way to ensure the party-of-six thing, or to work around trades and "Original Trainer" tags... And of course, given enough information, the process is perfectly reversable, that is, a Pokémon can be released by a process as simple as the one used to tag it. Information transport seems not to be a technological bottleneck in the Pokémon canon, at least where the anime is concerned, so I'd go with this idea.
The q.m. thing also allows easily for different Poké Balls for particular use, such as Heavy Ball, because it simply boils down to what strategy the device uses to "inject" the tag and how much time and energy does it take. From that perspective, a "Master Ball" is not a Poké Ball that simply ignores the tags, but also has to work on disassembling the old tag, removing it, and force an injection method guaranteed to work, which may, in terms of quantum mechanics, "damage" the Pokémon. A nice touch.
The final thing is, there is no particular way the Poké Ball can "understand" the association between the trainer being dead and the Pokémon is owned no more, unless we go with An-chan's idea and let the PokéPETA push a bit. Even then with a TVSD, the Poké Ball has to differentiate between "death of trainer" and "lack of communication", as a failure of the sensors may cause the Pokémon to be released without warning in places other than where the trainer is (let's say all of Gary's Pokémon suddenly released at grandpa's Lab because Gary tripped over a rock in northern Sinnoh). Also, the idea of "dead trainer = released Pokémon" kinda gives too many choices to whatever Team<InsertWordHere> happens to be on the run. That heuristic would be left a work for Bill, however.
Overall a nice idea. We can work it a bit more and excersise all of our communal craziness.
Normal text size