These professions are a core of the middle class. Maybe some of the most successful could be called upper-middle class, if they also had a large inheritance?
But a regular software dev or a GP is the perfect representation of a middle class - having enough money for comfortable life, travel, owning a house, new car, leisure activities and having money for investments.
If one can’t afford these (all at the same time) - it is not middle class. Middle class is not a “median - average salary class”, by a long shot.