Is it possible to run an (inkyphat) python write script on raspi shutdown (systemd)

Pi Zero W, Debian 9 (Raspbian)

I want to be able to run a last text-write to my inkyphat when I shutdown my Pi. So far, I’ve tried a number of systemd entries that allegedly work (for other people), but not for me. Here’s the systemd entry that almost worked:

Description=runs only upon shutdown
ExecStop=/bin/bash /usr/local/bin/shutdown_screen

And here’s shutdown_screen

# send a shutdown message only at shutdown (not at reboot)    
/usr/bin/systemctl list-jobs | egrep -q '*start' || "time to go"

I know this gets run by systemd, but I can’t get the shutdown to wait until the write has completed before it shuts down. Can anyone advise me here as I’m going round in circles :(

edit: I got the above from

You could try putting a time.sleep(30) in between the two to delay the shutdown. The (30) means wait 30 seconds, if you need more time just increase the value. You can as far as I know make it 100 or 200 or more seconds etc.

That sounds like an idea - I never even considered that!