If PostgreSQL is also shut down and you dont start the backup before its completely stopped it should be ok. You might need to restore to the same version of PostgreSQL and make sure it is setup the same way.
If you dump the data, it is safer, both that you get a known good state, and that it can be restored to any new database.
Grabbing the files as you suggest should be ok at least 90 percent of the time. But why risk it?
I do this always for any service but also do a dump of the db in the top directory to keep a clean copy to could be version independent. They wont take much more space ho estly
It's the way I do all of my service backups. One separate DB container per docker stack so nothing else is in there, all the data in one folder, and off we go at 1AM.
Yeah, also I don't run the latest version of the app in order to avoid breakage. I pin some tag so the app version so there shouldn't be a significant version mismatch during restore. I think @Esquero's suggestion to also dump the db just in case makes sense too. I'm gonna be writing a backup script / systemd unit anyways, might as well as a couple of lines for that.