iOS 11 has app offloading, which will do exactly that.