As far as the SQL Server product is concerned, the
SHRINKFILE operation is safe. It is designed to respect locks, recovery models, transaction log usage, etc. In the absence of a bug in the SQL Server code, shrinking a database file won't cause corruption of data loss.
All code has bugs, so there is a chance that a routine operation like shrinking a data or log file could cause corruption. But this is true of anything. There was a bug in SQL Server 2012 and 2014 that caused corruption when rebuilding certain indexes. This mean doesn't that index rebuilds are unsafe.
All of the issues you'd run into when shrinking a data or log file are related to performance and maintainability (causing index fragmentation, having to wait on autogrowth events as the data size increases the file size again, etc).