If that really happens before you fly, AND the airline doesn’t let you check in without ticket leaving the country before 30 days, you stand aside and buy an onward ticket for about $10, then checkin.
Then you get an extension at the immigration in the 4th week of your stay, making it 60 days.
If you’re thinking of the baby, you should plan for much longer than the few years of a DTV. The older a kid gets, the harder it will be to learn a new language, lose friends, and have a decent education.
Schools aren’t that good in Thailand and for a foreigner it hard to get a job (and work permit), plus a Thai degree is worthless outside Thailand. You better stay where your kid is a citizen (or in some western country, which got reputations for good education)
First stay will be 60 days, second with extension.
That doesn’t look like you try to stay long term bc of the missing extension on the first stay. And I haven’t heard of ppl having problems with 2 extended stays. Only at the third entry after a short stay outside.
And if you’re staying as a tourist anyway, you can go to another province if the first try is denied.