Is using the rm -P command safe on Macs with an SSD I read that secure deleting a file on any kind of SSD was dangerous because it could hurt the reliability and longevity of the SSD. Therefore, if I removed files using the -P flag, would hurt my SSD because according to https://ss64.com/, the -P flag instructs the command to do the following:

-P  Overwrite regular files before deleting them.  Files are
overwritten three times, first with the byte pattern 0xff,
then 0x00, and then 0xff again, before they are deleted.

Therefore, is using this command safe on Macs with an SSD, or can this cause damage since it is technically overwriting data on the SSD which causes wear leveling?
...is using this command [rm -P] safe on Macs with an SSD, or can this cause damage since it is technically overwriting data on the SSD which causes wear leveling

It’s perfectly safe.  You couldn’t really write enough data for it to matter. It’s also completely unnecessary as whatever you’ve deleted is instantaneously “gone.”  The block isn’t really overwritten, it’s just that depending on the SSD, the drive will only return zeros or random garbage when a read command is made. It’s also marked as “unused” rather than “deleted” so it will likely be overwritten with legitimate data quickly.
Additional reading:

Limited Read and Writes on MacBook Air SSD
How to get the &quot;securely erase&quot; function of Disk Utility on El Capitan &amp; Sierra
Can the data on an MacBook Pro SSD be recovered after formatting using Disk Utility