I recently read a book called "Mennonites, Amish, and the American Civil War" which mentioned that the Swiss-German Anabaptists opposed slavery partly because they were never exposed to it prior to emigrating. Is this true of other German immigrants to the US?
Generally, yes; Barbara Fields (who you may recognize from Ken Burns's The Civil War) wrote a great book called Slavery and Freedom on the Middle Ground, the titular middle ground being the state of Maryland. Maryland saw immense growth in the free black population, and a relative decline in its slave population, between the years 1790 and 1850, and one of the causes she arrived at was the large scale immigration of Germans into the northern counties. Germans came to the state either as professionals, shop owners, or grain farmers. Slavery in Maryland was based foremost on tobacco agriculture, since tobacco is a very labor intensive crop, which requires a lot productive infrastructure (i.e. special barrels and sheds for storage, and a whole host of other products). With these demands, a slave labor force could be economically productive year round. However the growth of cereal agriculture put different pressures on the labor market. Wheat requires much less infrastructure; there was massive demand for labor at planting and harvest times, but for the rest of the year, a prospective slave-wheat farmer would have to support many slaves who weren't turning a profit for him. Slavery had not been a part of Germans' lives before settling in Maryland, and it didn't really have a place in it once they got there.