You're right, but the religious retort to that would be that secular people are miserable and therefore less likely to marry and reproduce. Whereas I'm not sure why that should be true. Sure, secular people don't have a command to reproduce, so maybe taking away the command structure just reduces the likelihood; and I guess that's the selection bias you're talking about. But prior to organized religion, people were reproducing like rabbits, so there's got to be something else.
In many countries now, "over the replacement rate" or "under the replacement rate" is indeed a binary that closely tracks with religious observance. I would rather not out where I am, but here a couple having even a second child will cause some observers to at least ask if the family is part of a sect.