So a digital interface that is displayed on a screen of a desktop is "UX", but
the very same digital interface that is displayed on a touchscreen attached to
industrial machine is suddenly a totally different field "ergonomics"? Or does
it need physical buttons to be called that?
In your case, there would be an overlap. A digital interface is UI. UX is multi disciplinary, it would focus more on the human centered process of building an application that fits the user needs.
Ergonomic specialists would take into account the job (task), physical environment, user need, equipement (does the worker wear gloves...). Some are trained to be able to work on both fields (Human factor, cognitive engineer...)
You interact with websites using physical means, so it's an important aspect of how users experience them. If a website has tiny buttons and icons, it might be hard to use with a phone. On a large screen computer with a precision pointing tool it might be preferable that they are small. If the information density is ten words per 2000 vertical pixels, it's going to be a pain in the ass with a scroll wheel, not so much on a tablet where scrolling has almost friction-less inertia. Low contrast might be bad if you are using a phone, great if you're in a dark room.
If it's your job to improve the user experience, you're doing a bad job if ergonomics is not a consideration.
My point (as a UXer) is that up to around 7 years ago we were generally known as practitioners in the field.of usability / user interface design / etc.
The people in the field of Human factors and ergonomics pretty much still have those titles.
There is a lot of overlap but my point is UXers were known as Usability folks on the whole