As it has been said above, the presence of the papacy (and the strenght if the Tuscan and especially Lombard cities) makes any Italian "unfication" very difficult in the timeframe of the Hohenstaufen Emperors and kings.
I would not be so negative about Manfred and instead I really doubt some agreement with the papacy is possible in the years you mention, especially one where Manfred keeps any meaningful influence north of the Liri/Garigliano. The man made a lot of errors and could have better exploited Montaperti, but that would only have caused increased hostility from the clergy.
Anyways, focusing on Charles d'Anjou's 1265-1266 campaign, one can see that, while Manfred was too passive and Charles a great and inspiring war leader, there were quite a few instances where things could've gone very badly for the guelph army. So it is quite easy to imagine a decisive victory for Manfred, one which leaves not only Charles, but a lot of barons frome Provence and Flanders too, captured or maybe dead. What then?
You rightly point out Manfred's lack of legitimacy (although he was crowned and anointed in Palermo in 1258 so an interesting argument could be made where it's the baron's assembly who ultimately legitimises the king and not the Pope, a bit like in post-vespers Sicily), but after Charles' defeat the Pope would have no money and no army to defend Viterbo and Rome will certainly give herself to whoever is momentarily stronger (like in 1268). The ghibellines will have a very strong position in Tuscany and may make a comeback in Lombardy.
So I think Manfred could be in a good position to find an agreement with Clemens IV in exchange for tribute and renouncing his interests in Tuscany. Of course a more likely course of action is that Manfred tries to besiege Viterbo and his barons refuse to cooperate, leading to his demise, but Manfred already had seemed one who is open to compromise.
In any case, let's assume negotiations fail.
Consider how long did it take to arrange all the terms for Charles' expedition... And Clemens is going to die in 1268, leading to what iotl was the longest papal election ever and the first formal conclave. Given how close the whole business was, Manfred's influence could swing it towards a more neutral if not sympathetic pope.
Besides, organising another army on par with Charles' won't be an easy task at all and no adventurer like Henry of Castille could do it.
Conradin is a problem, becuase his existence makes Manfred's claims really tenuous, but he is not a really existential danger, unless Manfred pisses off his own loyalists (Giovanni da Procida, Galvano Lancia etc., who iotl went to Conrafin and asked him to claim his birthright).
The real and present danger comes clearly from France, with Louis IX who has all the rights to claim Sicily for Charles the Lame.
But will he actually do that?
He was never quite warm towards Charles' expedition and rightly so, because tge precedent of the Pope arbitrarily removing a king is not something that the king of France can look upon kindly. Anyways in the end he consented to the expedition and now will have also the motivation of avenging the honor of French arms. But still, he wanted a Crusade against real infidels and friendly ports in Apulia and Sicily, not an Italian campaign. What if Manfred treats the French prisoners gracioisly and offers support for the Crusade? Maybe then it could even be that Louis himself could intercede with Rome for a reconciliation.
Why should Charles lack a legitimate claim to the kingdom of Sicily?
The pope was the overlord of the KoS, and as such was within his rights to appoint a new king, since the old one had died.
It is irrelevant that other candidates were approached before (and anyway it mostly happened because Louis IX was against this adventure): Charles I arrived in Rome on 20 May 1265, was nominated Senator on 21 June, proclaimed king a week later. On 5 January 1266 he was crowned king of Sicily. He was the rightful king according to ecclesiastic and feudal law.
His minor son Charles the Lame is the rightful heir. Conrad the younger's claim is much weaker since his father was never crowned KoS by the pope, and was excommunicated. Manfred is a bastard, and has no claim at all on the crown (he might have been crowned king, had he accepted the papal proposal, but that's another story).
Manfred - had he been a different and better man - would have moved to control Rome and support the Ghibelline cities in Tuscany before 1260: it would have been well within his grasp, and would have put him in an unassailable position. By the time of Benevento, he's no winning options, even if Charles is defeated
I would not be so negative about Manfred and instead I really doubt some agreement with the papacy is possible in the years you mention, especially one where Manfred keeps any meaningful influence north of the Liri/Garigliano. The man made a lot of errors and could have better exploited Montaperti, but that would only have caused increased hostility from the clergy.
Anyways, focusing on Charles d'Anjou's 1265-1266 campaign, one can see that, while Manfred was too passive and Charles a great and inspiring war leader, there were quite a few instances where things could've gone very badly for the guelph army. So it is quite easy to imagine a decisive victory for Manfred, one which leaves not only Charles, but a lot of barons frome Provence and Flanders too, captured or maybe dead. What then?
You rightly point out Manfred's lack of legitimacy (although he was crowned and anointed in Palermo in 1258 so an interesting argument could be made where it's the baron's assembly who ultimately legitimises the king and not the Pope, a bit like in post-vespers Sicily), but after Charles' defeat the Pope would have no money and no army to defend Viterbo and Rome will certainly give herself to whoever is momentarily stronger (like in 1268). The ghibellines will have a very strong position in Tuscany and may make a comeback in Lombardy.
So I think Manfred could be in a good position to find an agreement with Clemens IV in exchange for tribute and renouncing his interests in Tuscany. Of course a more likely course of action is that Manfred tries to besiege Viterbo and his barons refuse to cooperate, leading to his demise, but Manfred already had seemed one who is open to compromise.
In any case, let's assume negotiations fail.
Consider how long did it take to arrange all the terms for Charles' expedition... And Clemens is going to die in 1268, leading to what iotl was the longest papal election ever and the first formal conclave. Given how close the whole business was, Manfred's influence could swing it towards a more neutral if not sympathetic pope.
Besides, organising another army on par with Charles' won't be an easy task at all and no adventurer like Henry of Castille could do it.
Conradin is a problem, becuase his existence makes Manfred's claims really tenuous, but he is not a really existential danger, unless Manfred pisses off his own loyalists (Giovanni da Procida, Galvano Lancia etc., who iotl went to Conrafin and asked him to claim his birthright).
The real and present danger comes clearly from France, with Louis IX who has all the rights to claim Sicily for Charles the Lame.
But will he actually do that?
He was never quite warm towards Charles' expedition and rightly so, because tge precedent of the Pope arbitrarily removing a king is not something that the king of France can look upon kindly. Anyways in the end he consented to the expedition and now will have also the motivation of avenging the honor of French arms. But still, he wanted a Crusade against real infidels and friendly ports in Apulia and Sicily, not an Italian campaign. What if Manfred treats the French prisoners gracioisly and offers support for the Crusade? Maybe then it could even be that Louis himself could intercede with Rome for a reconciliation.