What are the ethical considerations when publishing a cheating technique? Suppose I have devised a way to cheat at cards, exams or any other situation in which secret communication with other people or machines provides unfair advantage. The method is novel and uses original technology and algorithms such that I think they might be worthy of a scientific publication. 

The method is not a mathematical trick to solve a game while sticking to the rules, in which case I would see no ethical issue with publishing it. Think more of a method to remotely stream answers of a test directly into the retina without anyone else noticing.

I wonder if it would be unethical to publish this method in an academic journal. I personally feel strongly against cheating at exams, a little less strongly about cheating at cards but still, I wouldn't like to be making cheaters' life easier.

In their book "Beat the Market" Thorp and Kassouf write about why they published their method to edge their stock market investments. While the situation is different since using maths to make money is neither illegal nor unethical, some of their arguments might hold in my case.

In short, they say that they chose to publish their trick because other people will figure it out eventually, so:


They might as well get credit for it.
If everyone knows the technique, it becomes easier to replicate, detect and prevent. 
As Syndrome from The Incredibles would say: "When everyone's super, no one will be."


Any other things I should be considering?

Let's ignore the legal aspects of that process since they are boring and off topic.
I can’t really tell you what to do with that vague level of detail, but I can give you an example.

There seems to be a team at the Ben-Gurion University in Israel that regularly comes up with obscure ways to transmit data to devices not connected via any network connection.

Stuff like:


DiskFiltration: Data Exfiltration from Speakerless Air-Gapped Computers via Covert Hard Drive Noise,
SPEAKE(a)R: Turn Speakers to Microphones for Fun and Profit,
and many many more.


The only uses I see for that stuff is to either help malware authors and intelligence agencies or make people aware of this communication channels to increase security.

If your findings are anything like this, I don’t see a problem.

Update
After you clarified it's about a method to remotely stream answers of a test directly into the retina without anyone else noticing:

There are a lot of uses for such a technique which are not related to cheating. Pick some of them as motivation, and then later in your paper describe how this could also be used for cheating. Maybe give hints what some mitigation measures could be.