Using wood glue instead of fasteners for raised bed garden
You're not building a deep space probe where you need to optimize everything as much as possible.
Screws and nails are plenty suited to the job. We've been building buildings with screws and nails for thousand of years.
If the wood is rotting, solve that problem. It won't matter what means of joining you use when everything is rotting anyway. Use good pressure treated lumber and good screws and your garden bed will hold up fine.
Titebond 3 or epoxy will work, but it will take much longer for no advantage whatsoever.