Luci app depends on some dependencies. That would be larger file consumption.
Why don't you just try to install htpps-dns-proxy alone without luci interface (lesser space required) . DoH still works if you don't install luci app version.
While the https-dns-proxy is still the most efficient solution for resource-strained routers, it depends on curl/libcurl which (depending on the platform) is about 64Kb. So like @slh said, you don't have enough space for it, wherever you want WebUI or not.
If you create a firmware with luci-app-https-dns-proxy and dependencies included, you may be able to fit it as the packages backed into the firmware are compressed and take a little less space. That's also the only option to make space on your device by removing some packages -- because that way they are actually removed from the firmware being built, otherwise the space is still taken by them even if you uninstall them from the already made image.
I requested custom build in firmware selector,
added luci-app-https-dns-proxy and https-dns-proxy packages in the list
and flashed the generated image,
and it got installed