In Hapsburg times, only a fairly small elite outside of Austria knew German. Most people in the Empire knew only their own language (or sometimes e.g. their own language and some degree of Hungarian). It wasn’t until after the fall of the Austro-Hungarian Empire that the average person – due to modern state-schooling curricula, business contacts with German speakers, or going to work in Germany – began to know German.
There is quite a body of scholarship on the sociolinguistics of the Austro-Hungarian Empire, if you are curious.
Public/state workers had to know German, military personnel had to know German and as the education system was building in Habsburg Monarchy and Austro-Hungarian Empire children and university students were learning German. There are more than 2000 German words in Croatian language today dating back from Habsburg Monarchy and Austro-Hungarian Empire.
You don't build a bond with some nation and culture over the course of one century it takes more than that. For example like you probably know Ottoman Empire was ruling and controlling south-east Europe for 500 years and impact of that is very much visible and present today.
Speaking of the Ottoman empire, when I watched a Turkish show recently I was surprised to hear a number of words I had no idea were Turkish origin. (Well, could be the other way around too I guess. But they sounded Turkish.) Sanduk, čizma, budala, paramparčad, kapija, sandžak, inat, kutija, ajde just off the top of my head.
The German connection is definitely there. There was even a transliterated word used for people working abroad: "gastarbajter," from German Gastarbeiter. And it was used for anyone working abroad, no matter where :-)
Public/state workers and university students were a small elite until the 20th century, as were schoolchildren until a fairly late date. Also, the demographics you speak of were males, meaning that you are leaving out a half of the population.
Certainly German words in Croatian testify to contacts at some level of the population. Romanian, too, abounds in German words in some domains, for example, but this doesn’t mean the average Romanian would have been able to speak any German. But in Croatia knowledge of German varied greatly from the country’s northwest to its south. Again, the sociolinguistics of the Austro-Hungarian Empire are well-described.
[1] https://en.wikipedia.org/wiki/Habsburg_Monarchy