My Nintendo Switch V1 was modded but I later deleted all MicroSD data. I plan to sell my console so should I factory reset it or would I get banned after doing that?
You gain little by factory resetting the console, but it should be safe to factory reset if you've only used emuNAND and didn't make any changes to the sysNAND (blank prodinfo, AutoRCM, etc.). If you did make some changes to the sysNAND, you should probably restore those changes first before doing a factory reset (not sure if it's safe to do so afterwards, but it should be).
I'd just create a new profile and remove the existing ones, especially those linked with the NNID. After that, I'd remove any app / game you might have and any saved wireless network as well.
Doing a factory reset won't get you banned. Doing unauthorized stuff on your sysNAND, which gets logged and sent to Nintendo servers as soon as you connect to them, in most cases will get you banned. There's only a couple of activities that you can do that won't get you banned (check
this). Doing a factory reset won't clear those logs either.
error sharing is disabled but after deleting CFW i had problems with my MicroSD and they are listed in errors
SD card errors should be fine? Not sure which ones you were getting, but it doesn't really matter if it was on your emuNAND. If you had CFW on your sysNAND installed, however, that could be a problem and there's little you can do unless you have a sysNAND backup of your clean NAND which you can restore only if you've never went online on your sysNAND after you've made the backup. Otherwise, after restoring the backup and connecting to the Nintendo servers afterwards, you'll cause a log mismatch which will most likely flag your console for a ban.
I didn't install any modifications on my OFW and i didn't go online on emuMMC Atmosphere (Nintendo servers were blocked).
If that's the case, I'd say that it's safe to do the factory reset.
I vaguely recall there was a manual here somewhere explaining how to completely wipe it.
There are some scripts that can wipe the logs, but you'll cause a log mismatch as soon as you connect to the Nintendo servers. Unfortunately, even if you don't connect to the Nintendo servers, you're only delaying the inevitable.