"He says he wants them all the time, even brings up the topic himself! Then it’s deferred, deferred, deferred. He’s nearly 40."
I mean this kindly although it won't seem so.
He may not want children at all and his pretence is a particularly cruel variety of Future Faking. But, IF he does want them - then he doesn't want them with YOU. Sorry. One or the other reason is in play. :(
"I have had mixed views from friends- leave him or come off the pill without telling him. Neither of which I want to do in an ideal world."
This is not an ideal world.
"Am I really running the risk of being childless?"
Yes, yes you are. He will keep deferring until you cannot get pregnant. You might stay together, but it's more than likely he'll leave and get a younger woman pregnant.
I sometimes wonder if it's a power play. Whilst you can still get pregnant but don't because he says 'not yet' - well, he's in control of you, isn't he? When you can no longer get pregnant then your fertility is no longer in his control it's in Mother Nature's. The thrill of control is no longer there. Moving on to a younger woman rekindles that thrill. Men who indulge in this behaviour don't really see the women they are with as people, just - accessories to their lifestyle.
If you want children, then find another man to be your partner, because this one will not give you children. Or go it alone. Just don't sit there patiently waiting for him to say 'Yes, now' because that's not going to happen. ((hug))