Yes, Nintendo can detect a hacked Switch. The company has implemented various measures to identify and prevent hacks on its systems. These include regular software updates that contain security fixes and enhancements, as well as the use of digital signatures to verify the authenticity of games and other software. When a hacked Switch is detected, Nintendo will take various actions but most commonly they will completely ban your Switch console from their servers. Not only can hacking your Switch lead to a ban from Nintendo's online services, but it can also void the device's warranty and expose the user to potential security risks.