Is it looked down upon to do a second PhD (vs a postdoc)? In January, I started my third year of a computer science PhD.  My goal has always been to balance "X" and computer science ("X" being a non-engineering subject), and I thought I could do that at my current institution while officially getting my computer science degree.  Unfortunately, I underestimated the extent to which I'd be required to work on my advisor's agenda (he is strictly a machine learning person), so, while I've gotten a few minor papers in computer science + "X" workshops, I haven't been able to pursue the research agenda that I particularly care about.  In addition, I realized I really need a more deep study of "X" than I realized, and potentially than of CS.

The way I see it, I have three viable options:


Leave this summer with a terminal masters in CS, find a temporary job as a software engineer or whatever I can manage for a year, and apply to "X" degrees this fall, to start in Sept. 2021.  This doesn't sound too bad, but I'd risk not getting into "X" and ending up with no PhD and hence no chance at a faculty position (which I want).  
Continue publishing workshop papers on the side, and try to get a postdoc in "X" in a few years. My worry is that if I skip doing a PhD concentrated on my desired research topic (which is fairly specific and isn't something people are currently working on), I'll never get a chance to explore it fully, and that I'd only be able to get mediocre postdoc positions if I'm applying to a field I don't know enough about.
Get a PhD in CS as fast as I can, and then head straight to the start of another PhD in "X".  I like the idea of having a PhD in my back pocket, and this way I would have a lot of time to develop my research agenda, but I'm nervous that admissions committees would look down on someone who was "collecting degrees."


Any advice?

Also, for clarification: My desired research agenda in "X" has nothing to do with machine learning, so, while I can try to merge interests while a CS student, I believe it would be fairly superficial and only for the purpose of leaning my resume in that direction.

Edit: "X" is a humanities field that generally shares very little with CS except among a very few "computational X-ers"
I guess I would approach this from the opposite end. You want a faculty position, what is the best path to that goal? And would your feelings change if you had to fit your future research plans into a more acceptable box?

You say "no one" is working in the field you want to work in, and it's not a sufficiently interesting topic to catch your current advisor's interest in letting you play around in that space. Have you reached out to anyone in X field at your university? Do they seem interested or supportive? Are they willing to commit cold hard cash to your training or research?

To me, the idea that you're interested in a 100% new out-of-the-box field suggests that actually finding a faculty position in that field would be close to impossible, because from a hiring committee's point of view, your chance of landing big papers, big grants, finding students who share your interests, etc., would be next to zero. You'd be fighting uphill the whole way.

The reality is that academia is hyper-specialized at the moment, and academic careers have probably always been very prestige-/stature-driven. Someone doing computational medievalism (or whatever) risks seeming like a dilettante by the medievalists, and imho most science-minded folks sadly don't hold their humanities colleagues' research in very high regard. [aside: i very clearly remember attending a career panel back in grad school where a physicist casually suggested that humanities papers don't undergo peer review. The indignant English prof in attendance lost no time setting the record straight!]

Therefore, you might consider whether your research direction, however novel/interesting it is to you, has a place in your academic ambitions? Or maybe once you land your CS professor job, you could always try and learn something during a sabbatical? In any case, before you put years of your life, not to mention your own money (my understanding is that most humanities PhDs are self-funded or require substantial time spent doing teaching work for a small stipend), you should get more perspective from others whose opinions you truest in the two fields you want to bridge.