"buy good allen keys and replace them often"
Although hex keys are relatively inexpensive, you can extend their useful lives by grinding the worn ends down square to expose new, sharp driving corners.
Also, do not try to use the ball end types for applying significant torque as they are apt to strip out the socket; just use the ball end to get them started and spin them in, then switch to the squared-off end for final torquing.
Nitpick: From Wikipedia: "The Allen name is a registered trademark, originated by the Allen Manufacturing Company of Hartford, Connecticut circa 1910, and currently owned by Apex Tool Group, LLC. Its genericized use is discouraged by this company. The standard generic name used in catalogs and published books and journals is "hex key".