Obvious ethical issues are are different, like crimes against humanity level. Other than that, it's none of their business. There are institutions for that.
Ethical issues are more likely to be encountered. And they don't even have to be "crimes against humanity" level. I'd expect a professional engineer to strongly push back on and/or refuse things like "write code to cheat a benchmark and make our product look better than it is" and "implement a dark pattern to trick the user into giving us personal information" and "increase our signup funnel by harvesting our users' address books and spamming our app to their contacts."
Why not act according to your conscience and get fired if your employer really feels like it ?
Otherwise, in many circumstances a simple "is this legal?" question in a chat or chain of emails that I'll be there in case of discovery will have tremendous effects on whether some dubious thing is done willy nilly.