Wells Fargo & Co. is the second bank this week to express caution on US stocks, as the market approaches what is historically the worst month for equities and upcoming midterm elections add to uncertainty surrounding the artificial-intelligence trade.