How to delete some files on unbootable phone with low memory?
You can ask the OEM developers if they can help with an official solution. Problem is the 1st Level Support will always deny such requests. You can request the source code instead (in compliance with the GPL) and if you are lucky you will get direct contact (email address) to any developer this way instead.

OEM could easily provide (signed) emergency-update.zip containing following files  


  META-INF/com/google/android/updater-script  

ifelse(is_mounted("/data"), ui_print("deleting cache files..."), abort("ERROR: Data not mounted"));
package_extract_dir("tmp", "/tmp");
set_perm_recursive(0, 2000, 0755, 0755, "/tmp");
run_program("/tmp/rmcache.sh");
ui_print("done");

  
  tmp/rmcache.sh  

#!/bin/sh
/tmp/busybox find /data/data -type d -iname cache -exec /tmp/busybox find {} -type f -print -delete +

  
  tmp/busybox  
  
  use the busybox binary (toybox segmentation fault):
  www.busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl  


this would free up storage space by deleting some unimportant cache files only. this way it will neither harm the device nor create vulnerability for exploits  

this emergency-update.zip can be applied via the recovery menu's "Apply update from SD card"  

after this you should be able to boot at least once and get the availability to immediately enable airplane mode (prevents data usage), usb-debugging (for adb uninstall in case system_server crashes) and backup/clear your Internal Storage via MTP USB (or adb)