Using the "poweroff" command is safe, as long as you do not use a "force" option. While also that still syncs filesystems, so also there you normally are good, but some VMs may have trouble nonetheless (and I really would not force poweroff any server anyhow important).
But using the poweroff command ist not "system power failure". The former is a defined command which cleanly tells the init manager (in our case systemd) to power the machine down nicely, before shutting fully down we stop all VMs and CTs cleanly.
The latter is a power outage, or a hardware failure of a power supply - in that case the server just got "killed" in an instant, it has no possibility to do clean shutdowns at all.
To cope with such situations one normally uses one or more UPS, which have a battery backup for either compensate for a temporary outage or give the server enough time to cleanly shutdown on a permanent one.