Is it technically doable? Yes, it is technically doable to bundle an executable into a Safari extension on macOS.
Apple's App Store has strict guidelines regarding the inclusion of executable files in extensions.