A few years back I traveled to the States with a valid ESTA to attend one of those coding workshops in the Bay area.
I disclosed this with the immigration officer at border control and I was let it without any problem.
The workshop lasted less than 90 days but according to ESTA regulations, I could have only attended it if the teaching lessons were less than 18/hours a week. Technically this was a full-time workshop, but we only got 1-2 hours a day of actual lessons and the rest of the time was spend with the other students to work on projects together.
The problem is that now, many years later, I found out that the same workshop is issuing M1 visas for its foreign students. Apparently, they are now requiring M1 or F1 visas to attend the workshop and at the time they didn't discourage me to attend the workshop with my ESTA.
Ever since then I traveled to the States many other times and I got issues other ESTAs without problems. So now, what are my risks? I'm actually now married to a US citizen and we plan on moving back to the States in a few years. What would be the potential implications on my situation to my green card application?