2004seraph First of, userdebug builds are called that way for a reason, they have most security features disabled. So clearly never ever secure at all. You can of course make a real release build yourself, with any modification you want, but it is still all up to you to make sure you generate a signing key in a secure way, protect it from attackers, and verify your build was properly signed with that key with verified boot enabled, and that any such wipe-on-USB functionality also works in recovery and so on.
You really need to know what you are doing.
I would recommend anyone to rely on stock GrapheneOS and the weaver slot. Stock GrapheneOS has builtin functionality to disable USB.