"I can't do anything right," is code for "You are being unreasonable and I've stopped listening."
YANBU, he is. He had a choice to be a responsible parent and take her in with him, on her legs if awake, in her pushchair if not. I'm certain she would have been welcome, even if she fussed. No place of worship rejects children; if they did no caring person should dream of going there.
The biggest danger here was a spontaneous car fire. Unseen wiring problems cause this every day somewhere! It happened to a friend who had just popped in to see her DH at his work (mechanic at a garage!) but luckily - responsibly - she had lifted her sleeping DD out when she left the car. I have had a car go up in smoke in a car park due to a wiring fault. Nobody in the car at the time, but I saw it, and the whole interior was opaque with smoke in just a few seconds.
The car could have been crashed into by another vehicle parking. Imagine the child's distress. She is not a parcel!
The car could have been stolen. It happens. Again, imagine the child's distress.
A passerby noticing the unattended child could - and should - have called police. Your DD would have been taken into temporary care at the least. Ask him to imagine returning to the car to find police waiting for him and his child gone. Ask him to imagine being arrested on the spot for neglect.
What kind of father does he want to be? What kind of image does he want to project to his community and the wider world?
Does he need a handbook of what a good father does? It seems so! I hope your Imam gives him a really hard time. What is the use of a father who cannot responsibly take care of his DD even for a day?!