I'll start by re-posting here several segments I've previously posted on punishment and Foucault.
His influence is hard to overstate ... he's frequently accused (and rightfully so) for his very selective historical sources, and for not doing sufficient archival work, but in general he remains an essential touchpoint for almost every historical work on punishment and incarceration [...] There are large caveats to these citations, which are often empirical objections, such as those pointed out by Spierenburg (Spectacle of Suffering, 1984). Elsewhere, it's true that many historians often cite Foucault's various writings without much further commentary, as if he's simply a necessary inclusion (and I'm certainly not alone in making this somewhat sad observation). [...] it should be made clear that you simply can't detach Foucault's theory from his historical works. He doesn't just use them as case studies for his thoughts; they were organic processes of writing, through which his practices and notions of archaeology and genealogy were developed. We have to be uncomfortably reductive to provide a synopsis of such a formidable theorist, but to phrase it simply, you have to understand that his histories were often long-scale, pulling back the historical strata—not solely in events but in what he called epistemes, or the epistemological boundaries of a culture’s discursive constructs of, say, the human body, of sex, of the purposes punishment, or of man itself—to explore the winding-through-history of such concepts. And you can really only imagine these by looking at them in practice: in Discipline and Punishment, he outlined the evolution of Western punitive thought from public punishment to incarceration as the individual subject replaced the communal, concomitant with the internalising process of panopticism ... (https://www.reddit.com/r/AskHistorians/comments/2z2wlc/what_are_your_thoughts_on_michel_foucaults_impact/cpfe4tc)
That's all a bit tangential, but perhaps might helps some understand a little where I'm coming from. I'm more interested in the punishments and violence of the penal system rather than the move towards incarceration, so what I'm saying won't perhaps apply to others; in other words, I view his work from the early modern perspective, which with Discipline and Punish is concerned in many ways only for the sake of argument ("pre-modern justice was less a serious object of study in itself [for Foucault] than an elegant theoretical foil to the logic of modern punishment", as Friedland, Seeing Justice Done, points out). But I think we have to pair him with other major theorists, in particular Norbert Elias, before anything truly productive is produced. For one, his claims of the early-modern executions' production of 'terror' for the public to reinforce sovereign authority ('Part 1: Torture' of Discipline and Punish) draw on Damiens' excruciating and drawn-out death - a very extraordinary case - to make more generalised arguments, which don't really hold up in ordinary acts of punishment (see e.g. Friedland, or Bastien, L'exécution publique à Paris au XVIIIe siècle, amongst many others, for varied challenges to this interpretation, including retribution, communal expiation, a return to deterrence and state consolidation, and so on). In this latter sense of its link to the state, secondly, you also need those like Elias to help link punishment to more concrete institutions and systems beyond Foucault's symbolic focus on sovereignty. Those like Spierenburg have therefore done amazing work to reinforce Foucault's thesis by combining it with Elias, while drawing analytical attention away from the former's almost too-blind emphasis on France, as well as underscoring how other forms of punitive spectacularity - and not executions and tortures - grew in strength in the 18th century (and furthered in more recent work by, as mentioned, Bastien, Friedland, Porret, Chavaud, etc.). As I wrote elsewhere:
... see Pieter Spierenburg's now-classic The Spectacle of Suffering for an overview on spectacular punishment. Although a little dated, it holds its place firm as a go-to in this historical field of public punishment in early modern to modern Europe, and deals with the decline in capital and other visual corporeal punishments, drawing on Foucault's seminal Discipline and Punish -- which charted the 18th- to 19th-century transition from the physical infliction of pain upon the criminal's body to judicial reforms increasingly preoccupied with rehabilitation via incarceration -- and Elias' state-centred Civilizing Process, with a few revisions. (His introduction has a good summary and criticisms on these two 'giants' of the topic.) On the pillory itself, there are too many to list, and it depends what your geographical interests are: John Beattie’s Crime and the Courts in England (1985) is frequently quoted for his descriptions of the pillory as the ‘paradigm’ of the era’s penal practice. A lot of other publications are journal articles behind paywalls, but if you do have access, see as just two examples McGowen, ‘From Pillory to Gallows: The Punishment of Forgery’ (1999) or Greene, ‘Public Secrets: Sodomy and the Pillory in the 18th Century’ (2003). (Those are completely arbitrary suggestions, by the way; there are many others, needless to say.) To return to public penalties in general, there have been many possible answers proposed by historians and criminologists alike as to the causes of this growing antipathy to spectacular punishment. Squeamishness is one; others include the mounting control of the state, legal reformers' awareness of deterrence's failings, growing concerns for bodily integrity, and so forth. Some of these are problematic in their own respects. Shifts in elite sensibilities were not always concomitant with those of the lower classes when measured against continued popular attendance at executions during the 18th century, for instance. Others, like Foucault's narrative, have been found wanting; while discourses of pain and the body are important, for one, their dominance as causal factors might be reduced in favour of the sensibilities argument, since, as many have pointed out, hiding punishment did not necessitate its abolition. The death penalty is a notorious example of that, and I don't just mean in terms of the USA. (France's last guillotining was in 1977, for example.) (https://www.reddit.com/r/AskHistorians/comments/31w9yd/what_happened_to_public_shaming_why_does_the/cq6ha1v)
[Edit: fixed typos]