If you offer to automate something and the employer says "no, don't mess with our system; it works for us", then automating it behind their backs might not be a work for hire even though it's clearly work-related. This even sounds like the author was being treated more like an independent contractor than an employee.