As sub.mesa said, losing one or more writes isn't a problem. Well-designed file-systems, and other software, expect to lose writes on system crash and have recovery methods. E.g. NTFS has a journal.
A database log (or a file system journal) will protect a transaction in case of crash or power loss. A list of changes to be made are written to the journal before being made, then the changes are made, then the journal is updated to say that the changes have been made. If the power goes out at any stage - one of two things can happen. Power fails before the journal entry is complete - result journal entry either doesn't exist or is corrupted - the corrupted/incomplete journal entry is deleted, and no trace of the changes remains. Alternatively, if the journal entry is complete -the journal entry is used to ensure all the data changes are made and are correct.
It's therefore important that the order of writes is maintained - not necessarily perfectly. But, it's most important that the journal is fully completed before any actual data changes take place. The journal updates can occur in any order, as can the data updates - as long as the journal - data - confirmation order is strictly maintained.
Most hard drives will maintain this order correctly - the OS will request a cache flush at critical times - and the drive will correctly perform the flush operations. So, even if the drive uses write caching and loses the data, the correct ordering ensures that nothing critical is ever lost.
Some SSDs - e.g. Intel don't have a write cache at all. They have a tiny RAM buffer that is capable of handling one write command at a time. Any sensible file-system or database should have no trouble recovering from this.
Other SSDs have a big write cache. Assuming that they correctly handle write barriers and cache flush requests - they also should have virtually no risk of data corruption. (I don't know of anyone who has tested consumer level SSD - this may be difficult as the caches may not flush in obscure cases. There are some HDs around that don't correctly handle OS write barriers, and may write order-critical data out-of-order, necessitating OS patches to ensure data integrity).
Enterprise level SSDs with cache, feature a super capacitor - When power is lost, the capacitor holds enough power to operate the drive for a few seconds, giving enough time for the contents of the RAM buffer to be dumped to flash before the drive shuts down. In this case, there should be no risk of data loss due to power failure.
The big danger, as sub.mesa points out, is high-end RAID cards with write cache. These dramatically accelerate writes by breaking the write order requirement, which normally limits hard drive performance. This should be safe, because the cache RAM is protected with a battery pack (or on the latest cards, a super capacitor and flash memory). But without a battery pack, catastrophic and potentially irreprable file-system corruption can easily occur on power failure.