Can you do something like this in EU4?
Definitly, with C++ you can do anything, it's just matter how much work is needed, now much UE4 has to . But it definitly will require C++ work or else you find a plugin that let you do something like that.
The solution you showing is using TeamSpeak with a plugin that seems to direct voice to right player depending on range and game only send position data to that plugin i assume. So to replicate it you would need to read how TeamSpeak plugins work and figure how to communicate from game to TeamSpeak plugin which can be done in countless ways of your choosing.
Follow this question
Once you sign in you will be able to subscribe for any updates here