This is the plot device for an actual novel about a detective hired to solve a casino scam. Don't want to completely spoil it, but it's the main plotline.
A more low-tech version of a casino scam was the subject of a 1966 Warren Beatty film called Kaleidoscope. Here the main character broke into a Swiss card manufacturer and marked the plates for the playing card decks used in all the casinos, with marks only visible via 'special' glasses. The technique being discovered, Beatty's character is coerced into participating in a Scotland Yard sting operation targeting an international smuggler with an addiction to gambling. Tedious movie.
The author said most of the scams in his book come from real life, so it's possible someone did it in the past.
James Swain is the author, the series is his "Tony Valentine" books. Not fantastic writing, but packed full of scams and cons if you enjoy that kind of thing.