Corsets took a very long time to go out of fashion. The exact point is difficult to determine, because it depends on how you define "corset" - the shapewear industry went kaput in the 1960s as wearing anything as underwear besides a bra and panties was seen by that point as seriously outdated, but by a stricter definition, the average corset was beginning to use more flexible boning and elasticated panels by the end of the 1910s.
I assume you're asking whether the portrayal of corsets as suffocating had more substance to it than just as a metaphor? On the whole, no. By the late 19th century, the Industrial Revolution had led to corsets being mass-produced in factories out of cheaper materials, and just about every women wore one. At the twenty-five to seventy-five cent price point, domestic servants found them affordable and wore them to do taxing physical work for very long hours, which would not have been possible if they'd been fainting from lack of oxygen. Women also wore corsets while playing sports and exercising. At the same time, a wealthy woman who wanted to be known for having a tiny waist could buy a different corset to achieve that, which could in theory prevent the wearer from being able to expand her ribcage much.
A source I strongly recommend when it comes to fact and fiction of corsets in the late 19th century is Valerie Steele's The Corset: A Cultural History.