Daimler AG struck a more upbeat tone, calling for “slightly” higher 2018 earnings, as sales growth of its higher-priced Mercedes-Benz luxury cars like the S-Class coupe helps offset record spending to develop electric vehicles.