First you have to design a service worker that can intelligently download new updates to your app, relay to the user there is a new version, and you have to make sure you support changing apis as clients can be using the old versions of an app for a long time.
You have to design self destruct logic because your service worker itself can have bugs and break your app. In addition your self destruct logic can break.
You also have to make sure you service worker does not infinitely cache an old version of you app, because it will never expire without correct logic. You cant just assume to download higher version numbers, some times you want to revert to an older version of your app.