Reading this article is kind of wild... I was approached to do a very similar project at around the time he would have written this software.
I refused it.
That decision cost me at the time. I nearly lost my job over it, annoyed everyone involved, and the company lost what had been a fairly profitable client (who referred it to us, and looked bad when I rejected it.)
He may not have known that he was likely to get into trouble over it, but that means he was not duly diligent. If I recall correctly the arguments against my stance that this was not legal were as follows:
1) Advertisements were running on TV for this type of gambling (I produced a letter the DOJ was circulating to advertisers at the time stating in no uncertain terms that they consider it illegal.)
2) It was not a US company, and it was ok to write it for them since they are not bound by US law (I argued that I am a US citizen, and am subject to US law regardless.)
3) The company would get into trouble, not me personally (I argued that this was possibly criminal, and they could pierce the veil over it.)
4) It was not my job to decide this, and I should basically just shut up and do it... or there would be consequences.
Everyone was very pushy about this. The direct payment would have been large, and it came with some ownership (likely a very substantial amount of money.) When I refused I got into a very serious argument with my boss.
This lasted about a week, and included having to join a couple of conference calls where I was yelled at for not being a team player, was told I was sabotaging the company, and that maybe I was not worth having around after all. I was also told that they would provide a poor reference if asked, and would make sure I lost the referring client (who I did lose over it.)
I still calmly refused, and eventually ended the conversations with "At the end of the day I either write this software or not. I will not, and you are now wasting your time in trying to change my mind."
I qualified my refusal with the conditions under which I would write it: which included either a license by a US based gaming commission which I believed covered what they wanted to do, or a letter of opinion from the DOJ that this did not violate the law. Neither of these applied, and so my refusal stood.
I am now very glad I decided not to do that project.
Currently I work as a CTO (obviously not at that company.) Product development is under my control, and a non-trivial part of the job is to consider the legal implications of what we do (legal usually reports to the CTO for a reason.)
Liability in software is the same as it is in any other industry, despite the fact that overhead is lower than most. If you produce a product you specifically know will be used for illegal purposes you can very much be held liable (in that case allowing US citizens to place bets on sporting events over the internet.)
If the primary use is legal and you make some effort to curtail illegal activity, it is generally not an issue. In this case he either knew or should have known that the primary use was not legal. His case is weak, and it likely would be better for him personally to take the plea bargain.