I know quite some people at ASML and I worked a bit in lithography in the past. Yes, it's extremely hard to make a machine that can compete with ASML's. But given enough smart people, I'm convinced that it's totally possible. Making a machine that can compete with what ASML could do, say, 20 years ago is a matter of 10 people and 2 years (I did some contracting at a company that did just that). If you start there and then just keep adding the right kind of talent, then I bet in 10-15 years you can get impressively close.
Don't underestimate the enormous amount of technical and engineering debt ASML has accumulated through decades of mad deadline pushing. Nobody has time to invest in eg automated tests or anything that lets you guard code quality because all the good engineers are needed on the critical path to make the next deadline, and there's always a next deadline and it's always 3 months sooner than in any way reasonable. This is how they became a world monopoly, effectively. It's been a good strategy. They ship so early that the machines they sell simply don't work yet, so they put two engineers inside the box with it who (together with 50 more engineers back home) make the thing actually work while the customer sets it up in their fab.
As a result, their codebase is a steaming pile of shit. Copy & paste galore. An example: the code is so bad that you can't just fix bugs. If you find an off-by-one error in the code and you want to fix it, you first write a "risk assessment document" where you describe what the bug does and whether any code could potentially rely on the presence of the bug. Then multiple layers of risk assessment officers assess whether you get a go. Then, if you get a go, you can go and fix your off-by-one error in similar-but-not-the-same C files across 7 product families.
To be honest I don't know if the same holds for ASMLs mechanical engineering, physics, electro etc departments, but their software dept (a large percentage of their entire R&D) is easily 10x less productive than similarly sized and skilled software teams elsewhere. It's really mind boggling.
I'm convinced that a good startup with a good mindset, plus sufficiently good funding, can totally build a competitor. China just has to fund 20 litho startups so that 19 can mess it up and 1 makes it big.