We're lacking quite a bit of data, but let's run a few numbers.
If each message is about 1000 bytes, then 10K * 1000 * 8 / 2 = 40 Mbit/s. Not even considering the Wi-Fi part, that's quite a lot of upstream bandwidth.
If each message is closer to 10 K bytes (quite possible if yous end each message as its own HTTPS request without keepalives or TLS session caching), then we're in the hundreds of Mbit/s.
If you manage to stay below 100 bytes (possible if you send short messages in an existing socket or Websocket), down to a few Mbit/s. More reasonable but still quite a bit of traffic.
Also consider that those 10K devices at 1 message every 2 seconds means your server receives 5K messages per second. If the server is just forwarding them to another connection, fine. If you are storing in a database, we're talking thousands of IOPS. By far not impossible with decent SSD-backed storage, but not on you run-of-the-mill single HDD of course.
Also remember that if that data comes about 1 Kbyte on disk per message (very possible if you include indexes, etc, possibly much more depending on your DB schema), you're writing 10K * 1024 * 86400 / 2 = 442 Gigabytes per day!
But let's consider the upstream and server parts are sorted.
You'll never run 10K devices on a single AP. It's just not possible. Most "consumer" APs will choke beyond a few dozen devices. The best ones will stop at a few hundred in the best of conditions (using multiple radios on multiple bands). That's just for maintaining state, keys, and so on, we're not even talking about the devices communicating yet.
The ESP8266 operates only in the 2.4 GHz band. That band is quite small and also quite busy. We'll consider the case of "most countries" (the US has more restrictions). You only have 3 non-overlapping channels in 802.11b or 4 in 802.11g/n at 20 MHz.
I don't think you'll be able to have more than about a 100 devices in 2.4 GHz on a single AP. So we're already reaching 100 APs!
But with only 2 to 4 non-overlapping channels, the risk of interference between neighbouring devices and APs is probably too great for things to run reliably.
Remember that the speeds quoted for Wi-Fi (72 Mbit/s max for the ESP8266) are just raw stream data rates. They do not take into account overhead, preamble, ACKs, RTS/CTS frames, guard intervals, inter frame space, collisions, retransmits... When sending very short frames, the overhead can quickly use a vast majority of the airtime, so you can't compare 72 Mbit/s with the 40 Mbit/s quoted above.
Remember as well you'll have (at least) TCP ACKs, and 802.11 is half-duplex.
At this scale, I'm not sure what the right solution is. My first instinct would go towards Ethernet (and possibly PoE), but this is a massive setup (that's quite a few switches, and quite a lot of cables).
A probably better option is to have a single ESP8266 with sensors for multiple machines to reduce the number of devices, but I have no idea if that's possible in your case.