No 'categorical ban on paternalism' in Mill - first error
It is clear that in general Mill rejects a paternalist relation between the state with its power, and the person with her/ his autonomy and individuality. But Mill also supports both weak and strong paternalism, in senses distinguished below.
The liberty principle does not encourage paternalism - second error
While this is so, it is not the liberty principle, promoting individual autonomy and individuality, which 'encourages' paternalism but the state's responsibility to promote public - the general - happiness. If the liberty principle is a rule, there are exceptions to it; and Mill does not hesitate to face them. (Note that I am not here presenting Mill as a rule utilitarian; that is far too involved a topic to deal with here, only arguing that the liberty principle is a rule.)
Mill's general critique of paternalism
The main question that Mill had put to himself to answer in On
Liberty was: What were the limits of power which could be legitimately and justifiably exercised by society over the individual? (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 560.)
Point 1
In Chapter IV, Of The Limits to the Authority of Society Over the
Individual , Mill defended the right of the individual in the private
sphere on utilitarian grounds, insisting that if society interfered it
was bound to be in an erroneous way, and that it would not be for
the citizen's benefit: 'But the strongest of all the arguments against
the interference of the public with purely personal conduct is that,
when it does interfere, the odds are that it interferes wrongly, and
in the wrong place.' ((Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 561.)
Point 2
In Chapter V, Applications , Mill presented objections to government interference, arguing that there was no one so fit to conduct
any business, or to determine how or by whom it should be conducted, 'as those who are personally interested in iť. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 561.)
Point 3
Furthermore, it was desirable that citizens would conduct their
own affairs, as a means to their own mental education - 'a mode of
strengthening their active faculties, exercising their judgment, and
giving them a familiar knowledge of the subjects with which they
are thus left to deal.' Education meant for Mill the cultivation of
the intellect, of moral powers, and of aesthetic. Education is not to
teach, 'but to fit the mind for learning from its own consciousness
and observation'. The reasoning is: A good government cultivates
moral education; moral education makes human beings moral, thinking people who do not merely act as machines and, in the long run,
makes people to claim control over their own actions and inspires
them to intensely seek the truth. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 561.)
Point 4
Finally, the most cogent reason for objection to such an interference was 'the great evil' of adding unnecessarily to the power of government, both in the form of authority, and still more, in the indirect
form of influence: 'Every function superadded to those already exercised by the government causes its influence over hopes and fears to be more widely diffused...'. Mill, like many liberals, was suspicious
of the government, very cognizant of its powers and tendency to exaggerate and to overstep its conduct beyond necessary when exaggeration deemed to yield partisan benefits. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 561-2.)
Paternalism
Against the general principles against government interference
Mill pitted government's responsibility to promote happiness.
Generally speaking, whenever there was a probability that by interference the government would impede individual's development, it
should not interfere. Since this probability was usually present, governments - as a rule - should not intervene in the business of the individual. Moreover, governments should encourage all segments of the
community to manage their joint concerns by voluntary cooperation.
Thus it appeared that the general principles supplement one another
and can be reconciled. But then Mill went on to qualify his arguments, explaining that there were cases in which the reasons against
interference did not turn upon the principle of liberty. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 562.)
Joel Feinberg draws a distinction between weak and strong forms of paternalism.
Feinberg asserts that the basis of paternalistic intervention is con-
fined to the interests of the person with whom we interfere.
According to the weak version we are justified in interfering with a
self-harming conduct only when a person is not fully capable of
grasping the meaning of her act; whereas by strong paternalism we
are justified in interfering to prevent a person from harming herself
even when her decision is fully voluntary. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 574.)
From Mill's arguments and examples we may learn, adopting
Feinberg's terminology, that he sometimes favoured a degree of
weak, or it may be preferable to call it soft paternalism, but on some
matters, such as unripe marriage and irresponsible divorce, he did
not shrink from strong (or hard) paternalism. Thus, I suggest that
Mill's paternalism may be best described as elastic. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 574.)
Weak paternalism
Mill endorsed
soft [weak] paternalism when he exempted children and barbarians from
his Liberty Principle and also when he allowed stopping a person
from crossing an unstable bridge when we suspect that that person
is oblivious to the risk. But if the person, after being warned,
choose nevertheless to cross the bridge, then we need to respect her
decision. In the spirit of liberalism, Mill supported regulation
rather than coercion or outright prohibition. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 574.)
Another example with a similar reasoning relates to the use of poisonous articles. Mill acknowledged that those substances can be
abused but an outright ban on their sale would make legitimate use
impossible. Regulation, however, is in place due to the nature of
the articles. Thus registration of purchasers, including a statement
of intended use, is permissible. This is interference in one's
freedom that does not challenge autonomy. As long as such regulation is no material impediment to obtaining the dangerous articles,
people are free to make their own decisions Mill held that the State
had the right to prevent self-regarding harmful conduct only when it
was substantially non-voluntary, or when temporary intervention
was necessary to establish whether it was voluntary or not. He generally opposed the strong version: 'with respect to his own feelings
and circumstances, the most ordinary man or woman has means of
knowledge immeasurably surpassing those that can be possessed by
any one else. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 574-5.)
Strong paternalism
There is a place for strong paternalism. Let's explore this.
Perpetual contracts
Governments may control, through legislation, contracts in general,
especially those in perpetuity. For it is not enough that one person, not being either cheated or compelled, makes a promise to another.
There are promises by which it is not for the public good that
persons should have the power of binding themselves, although this
conduct is purely self-regarding in character. Thus there remain the
questions 'Whether, for example, the law should enforce a contract
to labour, when the wages are too low, or the hours of work too
severe; whether it should enforce a contract by which a person binds
himself to remain, for more than a very limited period, in the
service of a given individual; whether a marriage vow, entered into
for life, should continue to be enforced against the deliberate will of
the persons, or of either of the persons who entered into it.' [Principles of Political Economy.] Mill
summarized his argument by saying that every question which
could possibly arise as to the policy of contracts was a question for
the legislator, which she could not escape from considering.
Thus, in cases of perpetual contracts, the presumption that individuals know their own private interests better than others does not
hold. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 566-7.)
Birth control
Mill did not believe in the power of laws alone to shape society. The
shaping of society is a matter of moral development. Birth control was
both a matter for State interference and social stigma. Mill was an
ardent advocate of birth control. For him this was an issue about
one's health, personal liberty and mental development. Mill
suggested that society can be justified not only to prevent harm to
others but also in requiring people to aid one another with various
sorts of positive assistance. Indeed, in 1823, when Mill was seven-
teen, he went with a friend to visit the poor sections of London, pro-
fessing and advocating the use of contraceptives. From the fact that
he did not mention this experience in his Autobiography we can
learn that he was not too proud of this act, or of the result, i.e., his
arrest by the police for contravening laws on obscenity. Mill held
the view that one should consider the pros and cons in bringing children to the world in economical terms; that a family should bring
children only if it had the means to support them. In his obsession
with this issue, Mill rationalised that since no person had the right
to bring creatures into life, to be supported by other people, laws
which forbade marriage unless the parties can show that they had
means of supporting a family, 'do not exceed the legitimate powers
of the State' and 'are not objectionable as violations of liberty'.
Mill's ideas should be considered in the context of his time, when
young couples could not live together if they were not married. Such
things were not to be done. Thus the State was able and, in Mill's opinion, legitimate to prevent unripe marriages. This is quite an intervention into one's private life. According to McCloskey, in a letter
to Harriet Taylor, Mill also approved of social pressure to discourage
the joint self-regarding act of divorce by mutual consent, where no
other party is harmed. The State knows better than the couples
whether they should come into unity or divorce. The good of
society precedes individual autonomy and liberty. Here, Mill's paternalism is hard, and is difficult to be reconciled with the grounds
against government interference supra, and with Mill's statement
that 'all restraint, qua restraint, is an evil'. (Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582: 570-1.)
Summary
In view of complex set of cases above, Raphael Cohen-Almagor's label of elastic paternalism seems exactly right. He lists other cases which there is not the space to consider here. Such as it is, however, Mill's paternalism is not 'encouraged' by the liberty principle but by the state's responsibility to override the liberal principle in particular cases to promote the public - the general - happiness.
References
J.S. Mill, Principles of Political Economy, 1st ed. 1848; 7th ed., 1871. Bk V : https://oll.libertyfund.org/titles/mill-principles-of-political-economy-ashley-ed
J.S. Mill, On Liberty, 1859 : https://www.gutenberg.org/files/34901/34901-h/34901-h.htm
J.S. Mill, Autobiography, 1873 : http://www.gutenberg.org/files/10378/10378-h/10378-h.htm
Raphael Cohen-Almagor, 'Between Autonomy and State Regulation: J.S. Mill's Elastic Paternalism', Philosophy, Vol. 87, No. 342 (October 2012), pp. 557-582.
J. Feinberg, 'Legal Paternalism', Canadian Journal of Philosophy I (1971), 105-124.
H.J. McCloskey, John Stuart Mill : A Critical Study (London: Macmillan, 1971), p. 111.