The mixing-demixing phase diagram of ultracold heteronuclear mixtures in a ring trimer