I'll take a whack at checking your math by estimating a different way.
Aerodynamic & rolling resistance, power & MPG calculator - EcoModder.com
Rolling resistance - Wikipedia, the free encyclopedia
That link shows the ecomodder drag and rolling resistance calculator for an 80000lb fully loaded semi with optimistic Crr and Cd, with a frontal area of a little over 9 m^2
https://www.the-blueprints.com/blue...-4x2-semi-trailer-tractor-streamspace-cab.png
Using that table, somewhere right around 69mph it takes 150kW to overcome the drag.
150kWh = 69mi, therefore that's a fair bit more pessimistic than your example, at 2.17kWh/mi
Because the trailers are a standardized size and shape, I don't think you can appreciably change the A component of the drag equation, and .0045 is already pretty optimistic on the Crr. And sure, 80k lbs is a fully loaded worst case. Tesla does have experience with producing vehicles with low Cd, though, so maybe they can do better than my optimistic estimate of 0.6
Truck drivers are allowed to drive for 11 hours in the US, and 69mph * 11 hours = 759mi.
759mi * 2.17kWh/mi = 1647kWh. You could probably have 8x 200kWh modules.
If I use the Panasonic NCR18650B datasheet
http://www.batteryspace.com/prod-specs/NCR18650B.pdf which is the cells Model S used to (still does?) use: 243Wh/kg, and you seem to be WAY optimistic on cycle life.
200kWh modules would be 823kg or 1810 lb. 8 of them would consume 14,485lb or about 18% of the load capacity.
The data sheet suggests 300 cycles to 80% capacity. This article
Tesla Model S Battery Life: How Much Range Loss For Electric Car Over Time? claims 94% capacity after 50k mi on 85kWh Model S. S85 had 240mi EPA range, so that would suggest 208 cycles to that point. 80% cycles, times a more conservative 500 cycle life = 400kWh lifetime output per kWh capacity.
400kWh / 2.17kWh/mi = 184.3mi lifetime / kWh capacity. Using a more typical semi average fuel economy of 6mpg, that's about 30.7 gal of fuel displaced.
30.7gal * $2.50/gal = $76.80. - ($40/MWh energy cost * 0.4MWh) = $60.80 -- not enough to even reach optimistic gigafactory cell pricing.
Slowing down to 55mph cuts the energy requirement to around 89kW. Or 1.61kWh/mi
55mi * 11 hours = 605mi
605mi * 1.61kWh/mi = 974kWh
Use 8x 120kWh modules instead.
120kWh = 493kg or 1086lb * 8 = 8691lb or around 11% of the payload capacity.
400kWh / 1.61kWh/mi = 248.4mi lifetime / kWh capacity. Displaces 41.4 gal of fuel
41.4gal * $2.50/gal = $103.51 - $16 energy cost = $87.51 -- closer, but still not quite there.
I don't think you need to pay for the cell cost with the fuel savings though. Semi's are expensive vehicles, and I'm guessing the cost savings of not needing a big diesel engine will buy a fair number of batteries.