Stolarsky’s conjecture and the sum of digits of polynomial values