To use your example, portrait painting was essentially killed by photography. If you were a painter, or are trying to be a painter today, things don't look great.
However what you haven't addressed is the impact of reducing the human labor cost/skill to producing portraits. Historically painting portraits were prohibitively expensive, likely most people never had a painting/portrait of themselves or their family. The introduction of photography enabled everyone to have photos of themselves, their families, their children growing up, their wedding. In terms of labour, we started doing things with photos that only the richest people could have afforded to do with paint. Just think of how many mall photography shops there used to be in the early 90s. In the long term we wound up with a higher quality of life by making something that used to be expensive accessible, while still maintaining a large number of jobs. Just not if you're a painter.
tl;dr, automation is bad for the individual, but good for society.
However what you haven't addressed is the impact of reducing the human labor cost/skill to producing portraits. Historically painting portraits were prohibitively expensive, likely most people never had a painting/portrait of themselves or their family. The introduction of photography enabled everyone to have photos of themselves, their families, their children growing up, their wedding. In terms of labour, we started doing things with photos that only the richest people could have afforded to do with paint. Just think of how many mall photography shops there used to be in the early 90s. In the long term we wound up with a higher quality of life by making something that used to be expensive accessible, while still maintaining a large number of jobs. Just not if you're a painter.
tl;dr, automation is bad for the individual, but good for society.