I don’t think you can stop the supervisor completely and I’m not sure if stopping the container itself will work (probably yes).
You can use the io.balena.features.balena-socket label for getting access to the docker socket to be able to delete containers and images ( see https://www.balena.io/docs/learn/develop/multicontainer/#labels ).
I wouldn’t recommend this as the supervisor would download them again.
You can probably stop the resin-supervisor service on the hostOS sending a command to systemd through dbus.
I wouldn’t recommend that either because the supervisor provides most functionality.
You would need to ssh manually into the host os to start the supervisor again.
You are trying to do something which would prevent our Supervisor from running; we haven’t made a feature of that. You might be able to use DBUS to control systemd and stop the resin-supervisor service, then you would want to wipe the /mnt/boot/config.json file so that it loses the keys to talk to your instance.
I presume this is for some kind of security tamper trigger?