@greg I've always been attracted to those kind of games, but never really managed to get hooked.
There's a "recent" one that kinda matches your description : Screeps https://screeps.com/
It's a RTS-y kind of MMO with programmable agents of different kinds : some kind build, some can fight, mine, etc.
Again I never really spent much time on it, but I always wished I could, see if it's really interesting.
(You can even host your own server apparently !)