SD Card - how to reduce the power consumption?

Your SDClass::end() may not always work. You must make sure all files are closed before calling your end().

Your end() doesn't do the equivalent of an unmount for a file system. I never added that to the underlying SdFat. It really isn't possible since SdFat does not maintain a list of open files. SdFat was written with RAM use as a top priority.

SD.h has a feature or bug that doesn't allow begin() to be called without closing root so this version of end() fixes that. The underlying SdFat allows begin() to be called multiple times but once again you must close all open files before calling begin().

I would be interested in how much energy you can save with your power saving circuit. SD.h has the bug that doesn't allow SD cards to sleep but SdFat allows cards to sleep.

Modern SD cards sleep at 100 - 200 micro-amps. Many SD card take 500 ms to initialize and draw a lot of current during initialization. A card may draw 50 - 100 ma during this time.

My guess is that several minutes of power off would be required before there was any advantage.

I will be interested in how you determine this and what the result is.