It was normal to accept some form of vitalism way past 1851, and it was still around at the time of Planck's writing in 1897. In fact, vitalism experienced a resurgence in 1870s in response to the apparent tension between it and the energy conservation law, and somewhat crude applications of mechanics to physiology by du Bois-Reymond and others. Kelvin himself reaffirmed his vitalism in On the Dissipation of Energy: Geology and General Physics (1894). Bergson, who kept current on physics of his time and later debated Einstein, defended vitalism in Creative Evolution (1907), as did Haldane in Mechanism, life and personality (1913). Earlier, in 1870s, some big names in physics, like Maxwell and Boussinesq, argued for compatibility of vitalism with physics.
Although vitalism was not fully abandoned by scientists until 1920s, in 1870s mechanistic determinism a la Laplace started to gain ground. By 1890, the vitalism/determinism debate subsided and 'working physicists', like Planck, preferred to steer clear of the topic.
The history of the debate is discussed in Strien, Vital Instability: Life and Free Will in Physics and Physiology, Bordoni, Unexpected Convergence between Science and Philosophy and Hacking, Nineteenth Century Cracks in the Concept of Determinism. For the 'free will' aspects of it see History of the study of indeterminism in classical mechanics.
Here is from Strien:
"During the period 1860–1880, a number of physicists and mathematicians, including
Maxwell, Stewart, Cournot and Boussinesq, used theories formulated in terms of
physics to argue that the mind, the soul or a vital principle could have an impact on the
body. This paper shows that what was primarily at stake for these authors was a
concern about the irreducibility of life and the mind to physics, and that their theories
can be regarded primarily as reactions to the law of conservation of energy, which was
used among others by Helmholtz and Du Bois-Reymond as an argument against the
possibility of vital and mental causes in physiology. In light of this development,
Maxwell, Stewart, Cournot and Boussinesq showed that it was still possible to argue
for the irreducibility of life and the mind to physics, through an appeal to instability or
indeterminism in physics: if the body is an unstable or physically indeterministic
system, an immaterial principle can act through triggering or directing motions in the
body, without violating the laws of physics."
Here is Maxwell's take from 1879, which sheds some light on the background of his famous thermodynamic demon:
"Science has thus compelled us to admit that that which distinguishes a living body
from a dead one is neither a material thing, nor that more refined entity, a ‘form of
energy’. There are methods, however, by which the application of energy may be
directed without interfering with its amount. Is the soul like the engine-driver, who
does not draw the train himself, but, by means of certain valves, directs the course
of the steam so as to drive the engine forward or backward, or to stop it?"
Hacking adds more on the rise of determinism:
"Cassirer was wrong to say that our modern universal
body-and-mind causal determinism reared its head for the first time in
1872, but he pointed to a remarkable ferment in the concept of determinism
that reached a climax at about that time. The very word
''determinism'' became generally current in French and English just
before then, and in German it attained Cassirer's sense of the word
during the same period. The literature has been full of zany arguments
in which bits of mathematics of physics were pulled down from the
shelf to make room for freedom of the will. Buckle, whom we have
largely forgotten, turned the whole of history into the evolution of
statistical determinism. Exactly ten years later, a much more famous
work by Marx would speak of ''the natural laws of capitalist
production... of these tendencies winning their way through and
working themselves out with iron necessity.'' I believe that Cassirer
almost inadvertently pointed to a period of tumult and chaos in
thought about necessity and determinism."