The tech (or at least some of it) that is used for Face ID might be used for Animoji's as well to one degree or another, but it's likely just one part of what's used for it all.
I’m sure I remember an original review on the iPhone X (by MKBHD maybe) that said that Animoji doesn’t actuallly use the faceid sensors so in theory it could work on older iPhones too. Therefore why low light would matter