My Y6 DD has a hand-me-down iPhone from my DH, and rule is that she keeps it charged (we do check it), puts it in her school bag every morning (we do check that too). It has to be off and handed in at school, so we ask her to turn it on when she retrieves it as leaves school. I am training her at the moment to check her phone for messages when she first turns it back on. We have tracking on, so get phone actively messages us when she leaves the school gates, when she enters the local park and leaves the park again.
We have lots of rules about the phone and have emphasized at present it isn't a toy and it isn't for entertainment (she has an iPad at home for that) which is why she doesnt have many apps on it. But that is another thread.
Most of DD's friends walk to and from school "alone" now. We have been building up to it - in Y5 I walked the first, quieter half mile of the walk with her, and then she would meet friends and do the second half mile with them. I also said she couldnt walk alone until she passed my Test. This was, over many many weeks, me getting her to answer questions about what she would do in different scenarios. I wanted to test her judgement. I know that in real life she probably won't do what she says she would do, but it is a start, training her to be savvy and safe.
My DD comes straight home as she doesnt go past shops, and her friends don't walk past the same park as her. So I guess I'm lucky. Same with her route from secondary school, when she eventually goes there.
I'm hoping to train her to head straight home after school as I want her to do homework first. Usually she is desperate to come home to get a snack and watch Netflix before I start nagging her about piano practice!