The incumbent Prime Minister’s conservative Bhumjaithai Party bested a progressive movement that had been surging for years but lost its shine amid rising nationalism and economic doldrums.