Has anyone been able to recover deleted files from an emptied trash (on Mac)?
Yes.
There's not much detail in the question like your particular Mac model, the location of the original files; if they were on the "main" drive on the Mac or an external drive or even on an SD card (as you've referred to). So, the most accurate answer to your question is "yes, people were able to recover deleted files from an emptied trash."
However...
Those days are done.
I believe it's safe to assume you're not using a Mac with a spinning hard drive as those ended (with exception of the iMac) around 2015. You've likely got an SSD.
The problem that you're running into is that an SSD doesn't delete files like regular media. One a file is deleted, the controller (of the drive) sends a command to mark the sectors on the drive as unused and any subsequent read attempts are to return garbage. I've written about this very topic earlier: How to "securely" erase my MacBook's SSD
I was able to recover old deleted data from external hard drives and SD cards
Old Hard Drives and SD cards are not SSDs
You were able to recover data because of the way the files are stored and deleted.
First, SD cards are not SSDs. They may be solid state, but they utilize the SPI protocol to communicate with the host. CF cards (even though you didn't mention them) are PATA or IDE drives. Regular hard drives may use the SATA interface, but didn't implement TRIM (that was for SSDs). Basically, all of these storage devices kept files stored like an index that pointed to where the data was stored. To delete the file, you just remove the index leaving the data intact. y That no longer happens with an SSD.
With an SSD, the data is "sanitized" instantaneously removed by marking it "new and unused" and if a read attempt is made, it returns garbage.
This is why you experienced this...
I tried a few recovery softwares none I found efficient and some are even buggy... I also tried photorec but it was only able to recover useless cache files.
TL;DR
Any commands on the terminal to achieve deleted data recovery?
Unfortunately, no. You can recover data from old drives and from SD cards that don't interface with the system's drive controller. Once data is deleted from your SSD drive, it's as good as gone; it's for security and this is by design.
There's no Terminal command that's going to make recovery more likely. If there were, the software packages you tried would have utilized those commands themselves.