Well this story has made the news so it could simply be the beginning of a trend
Except that it isn't. The courts have had this jurisdiction for decades, and have been making similar decisions for decades.
For an example of a decision going the other way, I remember one where a mother with very limited capacity had had several children, all of whom had had to go into care because of her neglect of them. In a previous pregnancy, she had hidden it and given birth on her own, resulting in the baby dying. She was now pregnant again, and was again putting her own health and the health of the baby in danger. There was severe danger of her uterus rupturing. It was decided that, for the sake of both of them, she should be detained so that she could come through the birth safely.
No eugenics, no extreme measures, just a humane decision to go down the route of the least interference possible to ensure that both the mother and baby survived.