The file-based method of triggering safe mode is fine, but since HomeAssistant unlinks the trigger file when starting up in safe mode, the next (possibly automatic, by systemd) restart will run in normal mode. This is a real pain in the rear when debugging segfaults.
Please restore the --safe-mode flag as an additional way to force safe mode while debugging.