Shade - There have been several reports that leaving live, or cut Tricocereus in the shade for several months prior to harvesting does increase the percentage of alkaloids in the tissues of the plant. It is also common in Mexico and South America to leave cut Cacti in large covered stacks for some time prior to being sold. There may be a good reason for that practice.
Excess Sun and Heat - Too much Sun or heat will most definitely stress a live Cactus. It must be realized however, that increasing the alkaloids through stressing will greatly affect the plants growth rate, and might just kill it. Cactus can and do get sunburned, which can be fatal.
Nutrient level variations - Different formulas of fertilizers will affect the growth rate, and therefore the alkaloid mix and percentages. Very high Nitrogen levels in the soil would help to draw water out of the cactus, and promote stress. Use caution as too much Nitrogen will burn your plant. Remember though, a fast growing Cactus is also lower in alkaloids per volume.
Mechanical stress - A much ignored method of significantly increasing alkaloid buildup. The Cactus is cut or gouged in several places to simulate predator damage. The stem can also be girdled by wire, twisted or bent. Care should be taken when penetrating the skin, use sterile techniques to minimize the chance of infection. Although infection would be a major stress on the plant, it would probably die before any useful effects were manifest. Stressing has been practiced on Marijuana for millennia in certain parts of the world, to increase potency.
Watering stress - Depriving the intended victim of water is the most widespread method of trying to increase the alkaloid content. Many people advise to buy your Cactus at least one growing season in advance, and then let them sit, without water, until they are ready to harvest.
Chemical doping - There has been some pioneering work in this area done by Adam Gottlieb.
Erowid Cacti Vaults : Visionary Cactus Guide - Concentrating and Increasing Alkaloid Levels