Yes, someone actually did this and I found it running on our server
Sneak in a library that makes things more sane when nobody is looking…
Also, that isn’t “having a boss” it’s having a shit boss. As an engineering manager I am happy to go to bat and make excuses for time my reports spend paying down technical debt and making things more maintainable (within reason of course, and if shits really bad I can usually sneak a sustainability project into the timeline).
We’ll always need to make some compromises for our workplaces, the perfect job doesn’t exist, but what you described is a huge red flag. You deserve respect at work.