I've seen guards fabbed out of PVC pipe; looks like a more trouble than they are worth, IMHO.
I just recognize that some things in life are inherently dangerous & act accordingly.
If you do not have anything attached to the 3-point, turn the PTO off.
Never, ever get behind the tractor w/ the PTO engaged.
I don't turn it off when I stop to open a gate (I do have emergency brakes) but I always do when hooking up an implement. When I stop to open a gate w/ the mower attached, I do turn the PTO off, but not the engine.
You are wise to recognize the danger, but there is not much else you can do.