Definitely don’t defrag regularly because, yes, it will wear out the SSD. However, defragging once will move the files into a contiguous chunk of the partition and allow you greater success at shrinking it.
I seem to remember disabling hibernation and swapfile, then defragging, seemed to significantly increase the chances of success shrinking an active partition.
(Re-enable hibernation/swap after the shrink operation is finished.)
Definitely don’t defrag regularly because, yes, it will wear out the SSD. However, defragging once will move the files into a contiguous chunk of the partition and allow you greater success at shrinking it.