Is it safe or beneficial to compress a .photoslibrary file?

All the data is highly compressed and binary. I would just save it off as it is, Time Machine or any other file copy is sufficient and efficient in storage to back up your Photos library data within the library.

It is a package which is a fancy name for a structured folder on disk, so that’s why it’s easy to copy off using a variety of tools.