Heya,
There's a lot more to milky way (wide field astro) than just focal-ratio speed and exposure time to avoid star trails from a static mounted camera (tripod; no tracker). Coma is a big deal. Zooms tend to be very poor at wide field and the shape of stars and the coma can really wreck a wide field and make it look like a swirly oblong weird star mess.
The 40 F2.8 is pretty good. It will show some CA wide open on really bright large stars, but it handles coma decently for what it is, and is fast enough to work with. Coma gets worse the faster you go sometimes; depends on lens design. The 1DX can easily do ISO 6400~12,800 and with a 40mm, you can expose for 10 seconds, so you can get what you need to work with. Exposure of the sky is not the same as exposure on terrestrial subjects. Your histogram is in a good place if you see a single spike about 1/3rd into the histogram from the left. Any further left (1/4th) and you're underexposing likely. Any further right (1/2 histogram) and you're overexposing and will get a lot of sky glow, and you're not getting more signal from it, but just more problems. So do a test run on getting your settings in to get you to 1/3rd histogram fill and you'll be good, regardless of what lens and settings you use for wide field milky way.
The 17-40 at 17mm is awful. Even stopped down a little, it still has a lot of coma issues, and bright stars have a weird shape due to glare and stuff.
+++++++++++
40mm F2.8 STM @ F2.8 (ignore most things, just look at coma quality and CA as this is wide open); there's a little CA going on, but its not too distracting at this scale. I have a little blur from either vibration or too long of an exposure (ignore my times, I'm not static). But the idea is to see how it is wide open.

IMAGE LINK: https://flic.kr/p/nzCyTM
IMG_5171
by
Martin Wise
, on Flickr
+++++++++++
Here's a cheap ancient Tamron 28mm F2.8 manual lens (adaptall2 mount) that costs $40~50 on Ebay for reference to compare, also wide open at F2.8. You'll notice the coma is much stronger and see the shape of the stars and more CA is noticeable.
IMAGE LINK: https://flic.kr/p/nzDRpD
IMG_5164
by
Martin Wise
, on Flickr
+++++++++++
Here's the 17-40L at 17mm and F5 (stopped down just a little bit to help with the awful coma and distortion). It's not super bad, but it's bad. Forgive the really bad star spikes, was trying to mask how bad the glare and shape of the big stars were due to the awful coma of the lens at 17mm. Also, this was cropped, it's 17mm on APS-C, and the edges were really bad, so this is a cropped FOV from even the original so you won't see how bad it was on the edges, but it was bad enough I cropped it out (worse than the adaptall2 old lens above).
IMAGE LINK: https://flic.kr/p/JN8a4X
MilkyWay17mm_07082016
by
Martin Wise
, on Flickr
+++++++++++
Ideally on a full frame, you may want to be at 24mm or 28mm for galactic core milky way on full frame. Going wider just gives you more room for landscape foreground stuff or a lot of cropping room. You don't want to be at 17mm unless you're incorporating a foreground most likely.
If you have a 24mm prime laying around, that would be a good start.
If you just have the 40 STM and the 17-40L, you could try the 17-40L at 24~30mm and stop it down a little (F5, etc) and just push ISO harder (that's totally ok!). Or just use the 40 and focus on the galactic core where the interesting stuff is anyways and do 10 second exposures.
Very best,