There are a number of questions here to be answered, tax being just one of them, especially if a wife and kids come to play. For example, you also need to check for health insurance, which may be cheaper or more expensive depending on your wife's employment status.
And basically, given the situation you describe I would say it depends a bit on what you are looking for.
First of all, you need to sort out if you are a kind of sole proprietor (i.e. you write your invoices as Mr. John Doe) or if you have a UK Limited company.
In case of a UK Limited Company writing invoices to customers on the UK, that UK company would be taxable in the UK.
If you pay yourself a salary off that company or if you have your gains from the company transferred to you and you live in Germany on a permanent basis, then that money which goes from the UK company to you would be subject to taxation in Germany and in Germany only; unless you stay less than ~180 days per year in Germany.
If moving to Germany is more of a temporary thing and you don't need any money from your UK customers right now to sustain your living (because your wife makes enough) you could even keep the money you make in the UK Limited company. If nothing goes into your personal pocket, then the basis for taxation in Germany will be zero and you could use that money later on after moving back to the UK. Of course, you would have to work out UK taxes then.
For example, if serving your customers in the UK requires frequent and extended travel to the UK so you are typically staying more there than in Germany, you will not be taxable in Germany. But you have to be prepared to document that fact very clearly, i.e. being able to produce airplane tickets, hotel bills, etc.
This is a highly complex and dangerous matter, so getting professional advice is indeed adviseable. The problem with that is that tax advisors will either give you some verbal information in a first meeting which you will not be able to fully appreciate immediately or if you want something in writing that they will want some serious money for that.
Before looking for advice, make sure you make a list of clear and distinct questions you want answers to.
A distinct question will be for example:
I live in Germany and work for my UK company. My wife is employed with a German company. We have a child. How does health insurance work in that scenario? Will I and the child be covered by her insurance or not?
A too broad question would be:
What are my options in terms of tax if I live in Germany and work for customers in the UK?