Would it be ok/wise to end my PhD contract after submitting my PhD thesis in order to be able to start a new job at that time?
It is entirely common for students to take on a job before they have formally completed the program, and then do the defense and submit their thesis in the coming months. It happens all the time, and everyone understands that if you have a job offer that you intend to take and can't defer for a couple of months, then you should of course take the job. Employers will also understand if you tell them up front that you will want to take a couple of days of vacation early on in your tenure at the company to travel back to your university to defend your PhD.

So, yes, it is ok to do what you propose.