Developer here - late answer, but for anyone who finds this thread: this exists now. I had the same problem, so I built SleepStop. It's an Android app plus a Connect IQ app: SleepStop detects when you really fall asleep, adapts to you, stops whatever is playing on the phone (Spotify, YouTube, podcasts, audiobooks) and rewinds to the last part you actually heard.
It needs a newer watch than the fenix 5: fenix 7 / 8 / E, epix, FR165 / 255 / 265 / 570 / 955 / 965 / 970, Venu 3 / 4, vivoactive 5 / 6 and a few more. Android only for now.
Google Play: https://play.google.com/store/apps/details?id=app.sleepstop.ws
Connect IQ: https://apps.garmin.com/apps/57247def-3a3c-4caf-bb72-bbf6363b6054
(Independent app, not affiliated with Garmin.)