I guess it depends on the maturity of your 4 year old AND your ability to stay calm and help your daughter through this. I personally would not brought my kids that young. My kids were 13 and 11 when they attended and they asked.
What I would do is see if your dog feels well enough to come home or even to go to a park( even stay in the car if he can't move a lot) . Buy him some dog treats- heck even go and get him a hamburger and have a goodby celebration and try to help your daughter process it.
If you can be present for the euthanasia- it's peaceful and will help your dog with you there.
Choices are
Take him home for burial( check with you HOA)
Have him cremated and get the ashes back- or not.
We choose to get our pets' ashes back- we have a memorial garden and there are 3 azalea bushes- they LOVE the ash and I have some glorious blooms.
I am so sorry- it's the hardest part of being guardians to our pets. I have so many pieces of my heart gone with my pets. I think of Ol Man TJ daily- but I see a lot of him in our new pup - 4951