I used this great teardown to get some Gosund SW5s working.
https://www.elektroda.com/rtvforum/topic3892160.htm
Everything worked great, but my version was a bit different.
Before considering things I include here, read the post above. I won't repeat things here.
My version:
Externals:
Gosund SW5 smart Wi-Fi switch
Model: SW5
Manufacturer: Shenzhen Cuco Smart Technology Co Ltd (from box)
Date code: 11/23 and 12/23
Internals:
PCB: SW5-A-V2.1
Module: Z2-N-V1.1 has other "0717" marking
MCU: BK7231N
Smart life app reports:
Main Module: V1.0.1
MCU Module: V1.0.1
P7: LED (main, green, most visible)
P8: Btn
P14: Rel
P16: LED_n 1 (red, visible through same switch window as green)

The only real significant difference I see is the module and chipset are different. (new module version# with an N Beken chip vs. the T)
The openBeken N firmware was available here: https://github.com/openshwprojects/OpenBK7231T_App/releases and serial flashing worked well.
There was not a device-profile supported for this chip/firmware on tuya-cloudcutter. Cossid helped get that sorted super quick https://github.com/tuya-cloudcutter/tuya-cloudcutter/issues/598. I was able to get it flashed OTA without opening one up using this guide here: https://github.com/tuya-cloudcutter/tuya-cloudcutter/blob/main/HOST_SPECIFIC_INSTRUCTIONS.md
I really want to get another auxiliary input working (Maybe those TX/RX TX2/RX2 pads) but I'm getting stumped as the bootloader and firmware are making use of those pins for serial programming and logging. I was able to get TX/RX freed up and working as GPIO (with a custom FW hack to the SDK source), but I'm concerned I might be messing up future serial loading capabilities. TX2/RX2 have been more resistant to my novice hacking. I want the extra input because I like using it for controlling a 3-way switch for another light with a dumb switch in the same electrical box. Anyway, I'll probably be posting for help on that soon (10 more bangs of the head on desk first)