It’s not officially supported, but I can see a few “unofficial” community builds. I like the idea of getting a small phone as a media player. I have some experience with installing operating systems, but never a phone. How difficult is it? Is this a good idea?
I have an XZ1 Compact myself and was using it as my primary phone with LineageOS (+microG) and later iodéOS until 3G was shutdown in Australia. Nowadays I use it as a portable music player, although I don’t listen to music away from my desktop that often so it doesn’t see much use. It sounds fine to me, certainly good enough for the overwhelming majority of people I would say.
I can’t really tell you whether it’s a good idea to buy one for this specific purpose, that’s quite a subjective question. It is very easy to install custom ROMs on that phone, though, and those that exist are well maintained. Some of the answers here are overcomplicating or fearmongering; installing custom ROMs is just about reading carefully and following basic instructions. The overwhelming majority of issues people run into come from impatience/inability to read. Bricking the phone is not a realistic possibility unless you are braindead.