I built up tolerance of the crate door being closed by sitting next to my puppy in full view whilst he settled in the crate for naps. So whenever he surfaced from light sleep, I was still there (on my laptop actually) with my hand available to stroke him through the zip panel etc. We had a fabric crate, not so strong, but our dog is a small breed. He doesn't really like real bars on a real crate unfortunately, but maybe if I had perservered with that crate it would have been the same.
We now have a situation where he is very happy to sleep for a long time in his crate with the door shut. It is a large, but dark crate (one bit open to view, but door closed) We have a cosy woollen blanket he has a good association with too.
When we leave him unattended at other times, it is mostly so random he doesn't quite know if we have left or not, and seems okay for about an hour at least.
I think the trick is to leave them when they are ready for a long nap (so after eating and toileting) and comfortable taking that nap in the crate (and you have observed this whilst being in house for a week or two with them). Slowly make the nap something they take when you are not in the same room, having established that the crate is a lovely place to be. Then practice leaving the house itself for twenty minutes (you could leave an adult upstairs to check whether the puppy even notices you are gone)
Our puppy is just over 5 months old. We don't leave him much but he really does settle well in the crate - sleeps two hours sometimes? and is beginning to just cope with comings and goings. Yak milk's chew is good too!