There are applications that resist uninstallation (these are apps protected by the system) but can at least be "frozen" with the following command: "adb shell cmd appops set RUN_IN_BACKGROUND ignore". You might want to implement that feature.
It would be good in a separate section to freeze the apps in the background, and you could also add a section to freeze them. With an adb command, they can be frozen.
There are applications that resist uninstallation (these are apps protected by the system) but can at least be "frozen" with the following command: "adb shell cmd appops set RUN_IN_BACKGROUND ignore". You might want to implement that feature.