How can a present software-engineer (with experience of 5 years at least) turn into a physics professor?
Your situation does not sound fundamentally different from any other university graduate.
Your work experience will possibly give you some technical and time management skills that others don't have, but you'll just have to put your skillset to good use like every other graduated student.
Note, that going to graduate school for the sole reason to become a professor is a bad idea. The odds are extremely slim. So if you're not enjoying the process/path you'll likely be disappointed. If you're loving doing research with very little income go for it!