Highflying artificial intelligence stocks look increasingly risky, so investors should allocate some money to names that aren’t likely to plunge if the AI trade falters.