I think that all that needs to happen is after all processes from the device cgroup have died/been killed is just to remove the /sys/fs/cgroup/devices/$SNAP_NAME.$SNAP_APP/ directory to remove the cgroup.
I think that all that needs to happen is after all processes from the device cgroup have died/been killed is just to remove the /sys/fs/ cgroup/ devices/ $SNAP_NAME. $SNAP_APP/ directory to remove the cgroup.