I wouldn't be so scared; it could have been anything from powersaves to PKHEX.
As a game-shark user from the gameboy era, I noticed that generating Pokémon or (anything else) trough HEX editing was not a simple task. Your code has to take into account all the stuff involved with the changes you make: For example, sometimes, in-game acquired items trigger changes in your save/game, while "illegally acquired items" do not. If you own the original code, you can “quickly” scan the game and detect such irregularities.
It was rather obvious when the things scaled to GBA and the DS, it was a pain getting your Pokémon right. I remember it was when the first “Pokémon consistency check” software was launched.
Perhaps there will be need for a “Pokémon saved-game consistency check” software, in the future?
If you ask me, I think it most of it was powersaves, because their codes do not take into account trainer data or the fine details. As far as I know or as far as I am concerned, they just duplicate the same stuff in whatever saved-game you tamper with.
That happens when you are deprived from making your own codes.
On the other side, I believe PKHEX is primarily intended to help you grow with your Pokémon and have fun with them; I don't know how PKHEX works from the inside, but if I was going to work with save data, I would try my best to make my edits work -exclusively- with my target-data. And I think the science behind PKHEX's is focused on that subject.
As long as you stay within the boundaries, you will be fine, I think.
So, it is pretty obvious to me: Whatever method they employed, those bans are the result from exceeding the limits of the game using external devices. Pretty much, it was people getting greedy.
I did not expect that people capable of editing their saves were so privileged… I think that 6'000 of banned individuals is a very small number (considering market size and demography).
You can always start over, just take smarter shortcuts.