I don't know of a single terminal that actually gets these ZWJ emoji sequences right. There are several terminals who will render them, but I haven't seen any actually get the width calculations correct. (E.g., https://github.com/kovidgoyal/kitty/issues/3810.) Part of the problem is that it really messes up the idea of a rectangular grid of base characters in memory, so you'll need some sort of indirection. Obviously I haven't tested all terminal emulators in existence, though :-)
I patched a similar bug in screen earlier this year (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039503), which indicates the kind of stuff you have to go through.