If the wiped M1 Mac can boot up, you can straightforwardly use data recovery software on the Mac to recover data. You may need to create a new user account if there is no one. You can use Share Disk to access the target M1 Mac when it is unbootable.
Therefore, you should make sure whether the wiped M1 Mac is bootable. If it is, you can directly install and run third-party data recovery for Mac to scan for deleted data that is not overwritten. If you can boot up the wiped Mac, there are several ways you can choose:
Method 1. Run iBoysoft Data Recovery for Mac in recovery mode to recover data from an unbootable Mac. You need to boot the Mac into macOS Recovery Mode and run the Terminal command to install the data recovery software, it enables you to scan the Mac hard drive and recover data there.
Method 2. Boot your wiped M1 Mac from a bootable USB. Then you can launch third-party data recovery software to access the the wiped Mac drive and perform a data recovery.
Using Share Disk to access the M1 Mac from another Apple Silicon Mac can only copy files. Given that the M1 Mac is wiped, this method is not applicable. By the way, you should know that third-party data recovery can't detect SSD in Share Disk to recover data.
If an external hard drive is not showing up in Disk Utility, it is not detected and mounted, then it won't appear in Finder and Desktop. Maybe, you can click the View button in Disk Utility and choose Show All Decives.