It's worth noting "course of employment" is different from "time at work", as it's defined by the tasks you're hired to do. If the person in this article was in the UK his data-entry contract could well be drafted in such a way that writing a program for the purpose of automating his job would fall outside his specified work duties.
Good point. It does depend on the terms of the contract, but "course of employment" is defined quite widely so if the contract was silent, there would be an arguable case to say the presumption kicked in as the work was done for the benefit of the business, during work hours, and at the company's premises (as far as I'm aware).