What is your job? Is your job simply to do what is asked of you by your boss? As a young engineer, I was able to keep myself occupied at a 30% level with projects assigned to me by my boss. I used automation, coding skills, etc that my boss didn’t understand and was able to appear amazingly productive. So what did I do with the remaining 70% of my time on the job? Frankly I looked for things that needed to get done. I got myself attached to a lot of different but interesting projects. I solved problems that people knew about and others that nobody knew about. I even wrote a piece of code for a robot that nobody even understood needed coding.
I contrast my experience with the experience in this article. https://finance.yahoo.com/news/programmers-having-big-debate-over-182231099.html
Frankly, I don’t understand the questions in this article because I don’t understand the actions and the mentality. If you are looking to minimize your time on the job, if you are looking to “check the box” with your boss, I can assure you, at least in the places I worked, not only would you NOT get ahead, you would likely not be working there very long. In my day, engineers were not supposed to think as hourly employees, but rather as managers or better yet as part owners of the business. If this were your business, what would you do? That kind of ownership mentality, that sense of commitment is what employers typically desire.
Is it ethical to do what is described in this article? The answer for you will likely determine your career trajectory.