I think we just need to mark opkg as essential package.
You can test the effect by carefully editing /usr/lib/opkg/status. Skip to the "Package: opkg" section and add "Essential: yes" to it, afterwards opkg will refuse to uninstall itself with:
root@LEDE:/# opkg remove opkg
Refusing to remove essential package opkg.
Removing an essential package may lead to an unusable system, but if
you enjoy that kind of pain, you can force opkg to proceed against
its will with the option: --force-removal-of-essential-packages
No packages removed.