How can I gain some space and delete luci etc.?

ok, tertf.

Look here: Imagebuilder questions

and here: What is gltertf and why does it use tons of RAM?

The 1 meg database is the mac_vendor.db file

Personally, I find luci helpful but not the tracking database, so that’s a trade I would make. I also got rid of ipv6 stuff. But I would let things settle before I tried again at shrinking the firmware.