I just started a 3 year Post-Doc position at an engineering department at an German University. The Professor here, informally asked about my ambitions to do a Habilitation. I know that is the common route at least in several European countries in the direction of a permanent faculty position. However the planned activities, and research topics for the Post-Doc also seem suitable to do a second PhD in computer Science (while my current PhD is in Mechanical Engineering). Of course I would have to be an external advisor from the CS department, but i think that is manageable, since i already have some publications in the field of one of their groups and some positive informal contact to one of the Professors there. Also i feel confident that i wont need to much of their time for guidance since i already have the experience of the first PhD. 

My reasons to be more inclined towards a second PhD. instead of a Habilitation are that i think i will get bored of my current field in a couple of years, and the second PhD seems to give e a better chance to change fields later. 
On the other hand i do not know any people who did something like that. And i can not really predict the consequences or reaction of such a unconventional route. And i also do not want to freak out my new boss by mentioning this idea, if the majority of you would consider it as very inappropriate. 

What are the pros and cons of extending your research field by doing a second PhD in another direction stead of deepening while doing a Habilitation in the same field? Are there any big disadvantages for the Professor of the department which employs me which i maybe overlooked?

EDIT: The current Position is in Germany. Although i would be interested in staying in Germany, i would also like to hear about perspectives on this for  other countries. That also makes the value of the question more general.  

EDIT 2: Since my question was maybe not clear or specific enough. Lets say there is the situation that one is funded by a Post-Doc position in Department A, to work on a topic on which they also work in Department B. So the question is about getting payed by department A, and working on projects for A, but doing a second PhD in B as an external PhD candidate (as if i where in an external research institute), in stead of a Habilitation in A. 
Doing a "external" PhD, at an other place than the Supervising Professor is quite common in Germany. But only if the other place is a research institute or company, doing that in another university group, or university is very uncommon/rare.
Uncommon could imply that it is unnecessary, but rare could also be valuable. 
Therefore like to know what are the potential problems? Because i only see advantages (more collaborators, shared expertise) especially for topics that are on the border between two fields.