It's is not worth going to JR on. There is a distinction between how an overstay effects gaining a COT and applying for a spouses visa from inside the UK.
The COT is granted because a person has a right to marry in the UK regardless of their overstay, it stems from Article 12 Right to Marry of Human Rights Act. To deny this would be incompatible with that Act.
This does not mean that because one is permitted to marry here they are also permitted leave to remain as a result of that marriage and I believe it says as much on the bottom of the COT. The two are distinct from each other.
The overstay is a general reasons for refusal under the immigration rules. However under Rule 320 this general reasons do not apply to family applications (which yours is):-
This means that you can apply for a spouses visa from outside the country (ie. back home) and the overstay will not in and of itself be a valid reason for refusal. If there are no other defects in your application then it will be fine and you should be granted a visa.
Only you should return home, not your kids. They should stay here until you have obtained visa.
You may also consider seeing a UK immigration solicitor to prepare your out of country application before you return home to ensure the application is as cogent and easily read as it can be so that a decision can be reached easily by the UKBA.
If this is useful please kindly click accept so that I may be rewarded for my time. It will be gratefully received and you will be free to ask follow up questions.