A computer is a physical machine that runs programs which are encoded digitally on physical hardware (memory).
I could see an argument for considering a computer program to be an engineered "machine" that runs on a turing-complete computational platform. Just because a computer program is digital doesn't mean that it's not an engineered mechanism. In fact, early computer programs did run on physical hardware in a physically mechanical manner.
A doctor or lawer, on the other hand, is not building any type of machination. They are diagnosing patients and having arguments with judges. What exactly are they engineering?
That's exactly the point. Programmers write programs. They don't design engines, machines, or public works. Programmers are excluded from the very definition you're quoting.
If you want to expand the definition to include the application of scientific methods to solve a problem, so that it includes someone that creates a Javascript single page web app, there's no way to exclude those other professions. Programs are not machines by any conventional use of the term.
You can become a licensed software engineer
In any case, software engineering seems to be considered a legitimate engineering discipline.