Short answer is no. This will not guarantee that nothing can be recovered. Simply because the method is slightly crude and would require some miracle for the data you write to drive to match the drive's size itself. Even one file "sexytalkwithmywife.txt" and "bankdetailsforthepast10years.pdf" can be in the span of kB, and you may miss those sectors regardless of how many times you write.
for windows there are various utilities like this one which will do complete data erasure for drives.
for linux the standard for a long time has been shred, where you would first run fdisk -l
and lsblk
to figure out exactly which drive you are supposed to wipe (important step, many a cry have happened because people didnt do this) then to do something like this:
shred –vfz –n 6 /dev/sdX
where -vfz is, in order, please tell me how far along you are continually, please dont bother me with permissions, please write zeros on the last pass. n is the number of times to write random data to each bit. and sdX is the drive you identified in the previous step.
The last i heard the community was still a wash with how to handle this for memory and ssd's since they apply load balancing and trimm support as you say. Kingston came out with a suite of tools for the specific data erasure of these kinds of hardware called Secure Erase, See their article here. But some people (myself included) do not like the idea of a software that specifies only one manufacturer and to my knowledge isn't open source.
Here's the issue, there's no main standard for this yet. Most manufacturers of ssds have applications in firmware that can be called upon for wiping data properly in these devices, which doesn't make things very easy for us. Most of us dont want to go searching around hardware specs to figure out how to do this properly per each individual drive. Unless I've missed more recent developments (a possibility in this area) we may just have to wait for better options for ssd's and the like to be absolutely sure. But for now, i doubt you are dealing with the kind of threats that shred or eraser cant handle.