Is it true that the they twist small amounts as you hit bumps while you ride, and that's why they loosen? Would gluing spoke nipples simply solve this problem?
I have to say I think this is a myth, for a properly built wheel.
Spokes have threaded ends which the nipples screw onto. Like almost all screw threads, they are self-locking. Since the spokes of a properly built wheel are under a high level of tension, there is no "play" in the threads. In addition, any torque would have to overcome the high clamping force the nipple head is exerting on the wheel rim.
For the spokes to loosen, the load would have to deform the rim enough to relieve the spoke of all tension so that the nipple can turn. If the spokes are this loose they would readily flex sideways if you pressed on them.
There is some potential for spokes to loosen a little with a newly built wheel, if the builder has not relieved the spoke torsion. In this situation the torsion in the spoke shaft can overcome the clamping force, and wheel will go out of true in the first few km of use.
As you ride, your wheel deforms slightly. This allows the spokes to vary in tension over the course of a revolution. If the nipple threads have play in them, then this cyclic weighting and unweighting allows the nipples to move.
You may be suffering from low spoke tension over the whole wheel.
Spokes twist when the nipple is tightened, which may result in a spoke that looses tension very quickly while riding, putting the wheel back out of true. Spoke prep helps get the nipple up to tension with reduced twisting of the spoke.