Doing a second PhD in different field instead of a Habilitation
As has been covered in other questions e.g. Is doing two PhDs a good path? or After PhD in Aerospace Engineering, could I be admitted into a top university for a second PhD in Computer Science?, there is rarely a need to pursue a second PhD to change fields. Once you have acquired the basic research competence, you can shift fields at any point in your career (as indeed you are already doing by publishing in a CS field).

Moreover, the volume of research required for a PhD thesis and a Habilitation is quite similar. Rather than going back and doing a second PhD, would it be possible to start pursuing more collaborations with the CS department and publishing CS research, so as to eventually obtain your habilitation in CS? Or interdisciplinarily with research from both fields, if you would like to keep your options open?