In answer to this part of the question:
"Could a professor working in a university write up a thesis and submit it to his department to earn a second doctorate?"
Where that is allowed he would need to have been registered as a PhD student for the required period of time, which in many British institutions is three years if the research is full-time and longer if it isn't. Universities can't just dole out PhDs at the drop of a hat. The department and probably the higher degrees committee would also want to know in what framework he had carried out the research. I think he would have to do it outside of what he gets paid to do as a professor.
I am not sure how easy it would be to get round the requirement that a PhD student should have an appointed supervisor during those three years either. Of course he may not wish to do that, but if he did there might possibly be a way at some institutions.