It's certainly not inevitable, though some degree of consolidation is I think.
After 1815, I'd say that North Germany is going to unite- Prussia is just too dominant economically and militarily in the area- but it's quite feasible that the right PoD could leave Bavaria and possibly Baden and Wurttemberg out of it.
Before 1815, there's some interesting options, and I think you can possibly have an east-west split in the north as well.
For Italy, the periphery can probably be broken off if it stays independent for long enough.