This sort of social identity happens in all countries, I just pinpointed Germany because it is more "documented." The smaller the team becomes, the higher the levels of group polarisation and mass society theory take place. If you don't know what Mass society theory is, it is a theory that describes that socially isolated people (based on traits/upbringing/environment) are vulnerable to the appeals of extremist movements. So low-level clubs tend to attract people who are more likely to be xenophobes, racists, aggression, anti-social personality disorder, and whatever else.
There's also the ability of cross-country rivalries too, for example, when CSKA and Lazio met in the CL decades back, it was one of the most violent clashes we've seen in a long time.
Smaller clubs can definitely be prone to takeovers, but these come typically almost entirely from the outside. Like FC St. Pauli mostly by chance emerged as a place of refuge for left-leaning countercultures in the 1980s when they found no oxygen within "their" HSV. FC St. Pauli was the second club in a major city, but financially weak and with only a small preexisting fanbase. So punks could just come in from HSV and take over with barely any objections.
Or BFC Dynamo as the much-despised Stasi club in East Berlin, no one liked them by default so Neonazis and other asocials could join in and embrace their own interpretation of that image. Since major clubs have by and large already kicked this type of people out, they have occasionally made systematic attempts to take over struggling clubs with some existing support, like Alemannia Aachen for example. Bring in sufficient muscle from across the region and chase people with conflicting political ideals out, then arrange with those indifferent enough to have stayed and try to influence them. But even these cases are outliers.
In Poland practically all politically active supporters are either right-wing populist or right-wing extremist, and as good as every club's supporter scene is dominated by them. There have been clashes with apoliticals like when Polonia fans just fought among themselves when they played rival Legia's reserves some years ago, but by and large the scene is an established recruitment tool for the far-right including elements of organized crime and whatnot. There the dynamics are much more akin to the description above.
Big boys like to test themselves against the best also internationally. When Lazio was in Warsaw I was right behind the fence next to the Irriducibili, but there was zero trouble or unpleasantries during the match because Legia's relevant groups (who are aligned with Juventus) were boycotting the game and could only be fought outside the stadium which then did happen.