Sounds like LuCI might not even be installed in the first place, otherwise opkg would've refused deinstallation with "Package firewall4 is depended upon by packages:" without providing an additional --force-removal-of-dependent-packages
argument.
Check the release details printed by ubus call system board
and the output of opkg list-installed luci*
. The former should report a non-snapshot release (snapshot builds come without preinstalled LuCI) and the latter should list the following packages (with potentially different versions):
root@OpenWrt:/# opkg list-installed luci*
luci-app-opkg - git-23.311.75635-769b30c
luci-base - git-23.306.39416-c86c256
luci-mod-admin-full - git-19.253.48496-3f93650
luci-mod-network - git-23.313.56166-6da284d
luci-mod-status - git-23.306.52197-bdcd3e0
luci-mod-system - git-23.306.39416-7d3abf8
luci-proto-ipv6 - git-21.148.48881-79947af
luci-proto-ppp - git-21.158.38888-88b9d84
luci-theme-bootstrap - git-23.306.39416-c86c256
root@OpenWrt:/#