If I’m meeting my contactual obligations, anything more is mine. If I go above and beyond, then that is, essentially, a gift from me to the company, because I’m only compensated for what the contract says I’m compensated for.
If I spend my leisure time to build something that makes my job easier, I see that akin to using the time to go to the gym or get more sleep because that also makes my job easier. If it’s my leisure time, what I do is my business even if it helps my work.
Of course we don’t know when this person built the tool and maybe it was done in a less clear way. I always try to keep things I do for myself clearly separate. Eg if I’m WFH and the last hour is quiet maybe I’ll also put some food on while I finish work, but I would never use that time to work on a personal project but rather wait until I’m clearly clocked out.
But in terms of building it on personal time, I'm iffy on that. Obviously in tech the time tends to blend together... I've worked on weekends but also spent half a day doing personal stuff when I'm WFH and I have very little on my plate. It seems to me like the more relevant fact is that he clearly built this for his job - to me, that makes it feel like this is a situation where the employer claiming ownership isn't abusive at all. If he never would've built this if not for being employed at that job, and he used it primarily in that job, isn't it fair to say he made it as part of the job?