Crating is fine, and keeps the dog (and your house!) safe, but I'd work up to that crated 5 hour stretch...
I wouldn't want my dog to start feeling traumatized for some reason and have a bad experience, and then have anxiety about being crated or left alone.
My dog was first left alone in his first week with us when I went to get the mail and bring out the recycling!
Then, for about 15 minutes...
Then, a dash to grocery store (3o min)
Then, coffee with friends (1 hr)
and then shopping (2-3 hrs)
and now he is up to 5 hrs easily.
Every time I lengthened it, I came home wondering how he did, and he was fine.
It's not his favorite thing to be left behind, but so far he doesn't poop/pee/destroy/howl.
I think the gradual lengthening of time teaches them to not get separation anxiety.
If it's a long outing, I always bring him for a bit of a walk and leave him a stuffed Kong before I leave.
I am lucky because I work from home, so I never have to be gone for like 8.5 hours at one stretch.
( My dog also doesn't need to be crated any more - he is just free in house all day and night -
but he's an older guy (age 8 or older?) who considers himself to be a Human. )
Rumo ~ rescue shepherd/husky mix