Honestly calling it a "moral gray area" feels like a stretch. It's just breaking the law, not some big philosophical puzzle. People do way worse things for work all the time. Was the client really worth all that potential trouble?
Absolutely, calling it a moral gray area just softens the blow of doing something illegal. I had a similar thing happen where a boss wanted me to skip safety checks to save time. It was clearly wrong, and no job is worth that kind of trouble.
My friend did something like that for a contract job once. It totally blew up in her face when immigration caught on. Guess some risks really aren't worth it?