You can't make the entire RPi "hot unpluggable" by dealing only with the SD card.
You're (presumably) using the ext4 filesystem; this helps prevent corruption on your SD card because it's a journaled filesystem. But it can't do the job by itself. If the processor loses power it can't complete all of the filesystem chores it may be involved in executing.
This realization leads us to next consider an Uninterrubtible Power Supply, which may get you closer to what you seem to be after. There are commercially-available UPS "HATS" available (for example) that may serve your needs. Since these are usually battery-powered, you may wish to add software logic and/or additional hardware to terminate (halt
) RPi processing, and then power down the UPS and RPi to avoid exhausing batteries.
Your "hot unpluggable" idea is interesting, and not without applications, but it will require some effort to realize it.