Battery electric trucks (BETs) represent a well-suited option for decarbonizing road freight transport to achieve climate targets in the European Union. However, lower ranges than the daily distance of up to 700 km make charging stops mandatory. This paper presents an online algorithm for optimal dynamic charging strategies for long-haul BET based on a dynamic programming approach. In several case studies, we investigate the advantages optimal strategies can bring compared to driver decisions. We further show which charging infrastructure characteristics in terms of charging power, density, and charging station availability should be achieved for BETs in long-haul applications to keep the additional time required for charging stops low. In doing so, we consider the dynamic handling of occupied charging stations for the first time in the context of BET. Our findings show that, compared to driver decisions, optimal charging strategies can reduce the time loss by half compared to diesel trucks. To keep the time loss compared to a diesel truck below 30 min a day, a BET with a 500 kWh battery would need a charging point every 50 km on average, a distributed charging power between 700 and 1500 kW, and an average charger availability above 75%. The presented method and the case studies’ results’ plausibility are interpreted within a comprehensive sensitivity analysis and subsequently discussed in detail. Finally, we transformed our findings into concrete recommendations for action for the efficient rollout of BETs in long-haul applications.