I have been contemplating this actually. An opportunity for a lot of fun IMHO and ”page sysop” could use haptics :P
Not quite the same thing, but I wrote BBS door games back in the day and I keep thinking about writing one today for the iPhone, with ANSI art and all.
I’ve played around with iSH on the iPhone and you can definitely run a server in the background, but there are some fairly major caveats. Background apps are severely throttled compared to the foreground app (so you can access your basic web server from Safari on the same iPhone, but it’s not very fast). You also need to give the background app location permissions so iOS keeps it running. If you jailbroke your iPhone then it would probably be much easier.