I am unfamiliar with emacs, but following your message I decided to give a try.
I first found the latest released version is 27.1.
At first, I was not using --enable-kvm with qemu-system-i386, but because emacs is relatively big, it helps a lot.
did "tar xvzf emacs-27.1.tar.gz",
cd emacs-27.1
apt-get install ncurses-dev
./configure --with-x-toolkit=no --without-all
make
make install
then "emacs" works
when doing emacs-client, it was saying I needed to start emacs server...
pidof emacs
kill -9 [for each pid of emacs] because I had done some other things before
emacs --daemon
after that I can:
emacsclient allo.txt
Ctrl-X Ctrl-C to permanently quit
emacsclient -e '(kill-emacs)'
... that kill the emacs in --daemon mode
after that: emacsclient allo2.txt give me an error message quite similar to your but without: Invalid socket owner
so it could be specific to futur version 28.