Not long ago, I wondered about the possibility of a federal Italy on this very thread, actually.
Here's some background on the idea I had;
After the Congress of Vienna, the Republic of Genoa is restored to its pre-revolutionary borders as a Duchy aligned to the Austrian Empire, instead of being annexed by the Kingdom of Sardinia; the Duchy of Genoa is also granted the island of Corsica. The POD? Talleyrand dying in a very suspicious incident, and the Austrian Empire taking advantage of this. As a result, the Kingdom of Sardinia is a much weaker entity, and republicanism - both federal, as advocated by Carlo Cattaneo, and unitary, as advocated by Giuseppe Mazzini - becomes a much more appealing option for the peninsula's nationalists.
Once the 1848 revolutions happen, the leading role isn't taken by the Kingdom of Sardinia, but by the Confederacy of Northern Italy - an alliance between the restored Republic of Genoa led by Mazzini and the former Lombardy-Venetia, now split between the Republic of Saint Mark led by Manin (as in OTL) and the
Golden Ambrosian Republic led by Cattaneo. The region of Romagna, a historically rebellious component of the Papal States, joins the Confederation just as Giuseppe Garibaldi lands there, followed by quite a few veterans of his wars in South America, as the
United Provinces of Romagna.
Leading the peninsula's republican troops against all odds, Garibaldi is fatally wounded during the battle for Trento, that the Confederate troops will win, and dies soon afterwards. His wife, Anita, stubbornly refuses to leave the command of Garibaldi's troops to someone other than herself, openly challenging and opposing orders from above; Garibaldi's army swells in size, due to a combination of sympathy for Garibaldi and Anita's rather liberal outlook on accepting willing volunteers from all walks of life - in fact, enough girls and women would join Anita's army that a whole regiment - the now legendary Bianca Maria Visconti Brigade - would be created for them.
The Hungarian and Italian forces are able to meet on the outskirts of Laibach, defeating the Austrian forces just as the Habsburg navy experiences a mass mutiny led by the many Venetian members of it, who defect to the Republic of Saint Mark.
The Confederacy of Northern Italy becomes the Confederacy and Empire of Italy when Carlo Cattaneo - who was never really an enemy of the Habsburg crown, since even in OTL he would've been content with greater autonomy for Lombardy inside the Austrian Empire - proposes to the monarchical heads of state of the peninsula to join the new polity, that would have a very weak central government. They accept, even Pius IX, who never quite stopped having liberal tendencies in this ATL.
The constitution of the new country is heavily modeled after that of the Old Swiss Confederacy, with a unicameral Senate made up of ten representatives for each member country, elected or appointed according to their countries' own laws on the subject, an elected Prime Minister and an elected Emperor - the first of them being Leopold II of Tuscany, as Leopold I of Italy.
As of ATL 2018, the member states are:
Duchy of Massa and Carrara - Territory as in OTL - Parliamentary constitutional monarchy
Duchy of Modena and Reggio - OTL territory, plus Bologna - Parliamentary constitutional monarchy
Duchy of Parma and Piacenza - Territory as in OTL - Parliamentary constitutional monarchy
Free City of Trieste - OTL Imperial Free City of Trieste - Unitary presidential republic
Duchy of Savoy - OTL mainland of Piedmont-Sardinia minus Liguria, Novara and VCO - Parliamentary constitutional monarchy [*]
Golden Ambrosian Republic - OTL Austrian Lombardy plus Novara, VCO and Italian-speaking Switzerland - Parliamentary federal republic [**]
Grand Duchy of Tuscany - OTL territory, minus some border regions that chose to join Romagna, Elba, Massa and Carrara - Parliamentary constitutional monarchy
Kingdom of Naples - OTL mainland of the Two Sicilies - Parliamentary constitutional monarchy [***]
Kingdom of Sardinia - OTL Sardinia - Parliamentary constitutional monarchy [*]
Kingdom of Sicily - OTL Sicily - Parliamentary constitutional monarchy [***]
Papal States - OTL Papal States minus Romagna - Parliamentary constitutional monarchy
Principality of Elba - OTL Elba and Tuscan Archipelago - Parliamentary constitutional monarchy
Principality of Seborga - OTL Seborga - Elective constitutional monarchy
Republic of Corsica - Territory as in OTL - Unitary presidential republic
Republic of Cospaia - Territory as in OTL - Direct democracy
Republic of Friuli - More or less OTL Friuli, minus some border areas with Slovenia and Trieste - Unitary parliamentary republic
Republic of Ladinia - OTL Ladin-speaking comuni of Trentino-Alto Adige and Veneto - Direct democracy
Republic of Noli - Territory as in OTL - Unitary presidential republic
Republic of Genoa - OTL territory, minus Corsica and Seborga - Unitary presidential republic
Republic of Saint Mark - OTL Austrian Veneto minus Friuli and the Ladin-speaking areas, plus coastal Dalmatia and Istria - Parliamentary federal republic
Republic of San Marino - Territory as in OTL - Unitary parliamentary directorial republic
Republic of Senarica - Territory as in OTL - Direct democracy
Republic of Trento - OTL Trentino, minus the Ladin-speaking areas - Unitary presidential republic
United Provinces of Romagna - Papal Romagna minus Bologna, plus some border regions with Tuscany - Parliamentary federal directorial republic
[*] Shared monarch
[**] Italian-speaking Switzerland joined during the Sonderbund War
[***] Shared monarch
Members of the League of Peoples (an Italian version of the Commonwealth of Nations):
Empire of Ethiopia - OTL Ethiopia minus the Ogaden and border regions with Eritrea - Parliamentary constitutional monarchy
Free City of Tientsin - OTL Tientsin concession - Unitary presidential republic
Principality of Cyrenaica - OTL Cyrenaica region - Absolute monarchy
Republic of Eritrea - OTL Eritrea while in
Italian East Africa - Unitary presidential republic
Republic of Fezzan - OTL Fezzan region - Unitary presidential republic
Republic of New Guinea - Northwestern New Guinea - Federal parliamentary republic [****]
Republic of New Tuscany - That one map - Unitary parliamentary republic
Republic of Sabah - OTL Sabah - Unitary parliamentary republic [****]
Republic of Somalia - OTL
Greater Somalia - Federal parliamentary republic
Republic of Tripolitania - OTL Tripolitania region - Unitary presidential republic
Republic of Tunisia - Territory as in OTL - Unitary presidential republic
[****]
It could've happened.