Nobody is going to put a $30K battery into a Ford Lightning. After 10 years that battery is probably $3K. If it isn't and you're unhappy with the ~80% battery capacity it has after 10 years of usage, you sell it on to somebody who is happy with ~80%. You don't spend more than the truck is worth replacing the battery.
BTW. I was talking about semis, not pickup trucks which is not really a common vehicle class in Europe where I live. People that use vehicles for work tend to use vans and trailers instead.
In any case, diesel engines get a lot of servicing (and unplanned down time) before they reach their 1 million miles. And the engine has many parts that need regular attention & replacing. An electrical motor is basically going to be fine with little to no attention until its end of life. Batteries do degrade depending on the chemistry. But decent LFP batteries are available now with many thousands of cycles before they start degrading. Other than that, the whole drive train just features a lot less moving parts that can break or wear out. Things like brakes, suspension, hydraulics, etc. of course work the same way and still need servicing.
And again, if you are burning > 100K$ fuel per year, replacing the battery once every few years is not that big of a deal in the grand scheme of things. And this wouldn't come as a surprise either if you run a fleet of these things. You'd plan and budget for that to happen.
And it's not like the old batteries are a complete write off. They have a lot of residual value. Even if they are completely dead, which they typically aren't, they would still contain a lot of valuable minerals (like a couple of hundred kilos of lithium), lots of copper, etc.
With battery cost now dipping below 100$/kwh and actually trending towards 50$/kwh, we're talking about component cost of 25-50K$ for a half mwh battery for the manufacturer. The real price would be higher of course (labor, various suppliers taking a cut, electronics and other stuff) but over time that should get closer to the cost price than is the case today. And that cost price will come down further.
They are in operation on a number of large trucks.
[1]: https://www.carsguide.com.au/oversteer/phantograph-scania-tr...
Tom Scott video on the subject: https://www.youtube.com/watch?v=_3P_S7pL7Yg
Rail at best connects major cities, and a few minor ones. It is largely at capacity for the industries it serves, and moving retail freight to big box stores simply isn't possible. There are no knobs to turn or levers to pull to change that.
US freight railroads used to carry a larger variety of goods and serve a larger variety of customers than they do today. They were never in the business of delivering finished goods directly to retail stores, but they did transport a large amount of single-carload and less-than-carload deliveries between factories and warehouses. This is why if you visit older industrial areas you will see train tracks everywhere, including in the middle of the street and sometimes directly into buildings.
When the trucking industry was deregulated in 1980, trucking companies undercut railroads on low-volume high-profit routes, leaving the railroads to focus on low-value bulk goods like coal. The total volume of freight actually went up, but both revenue per unit and gross revenue fell. The railroads struggled to justify the cost of maintenance on now less busy lines, so they abandoned many of them and neglected the maintenance on others. That made it impossible to win back the lost business from the trucking industry even as the cost of trucking skyrocketed. Everyone is now worse off except for the owners of the trucking companies.
As for Switzerland, they invented a special kind of shipping container and that can be loaded/unloaded from a train or truck with no need for a crane. This allows them to make carload and intermodal deliveries without building any new infrastructure.