Here is the automatic power off switch for Creality Ender 3 V2. It does not need any electric changes or electric skills. Just print these objects and change printer End G-code. Here is the objects which you should print:
Print them and install to printer. After that add these two lines to Creality slicer printer end code. Settings -> Printer -> Manage Printers... -> Select Printer -> Machine Settings -> End G-code:
Add these two lines bottom of end script:
;auto power off
Thats it. Test and enjoy!