Pretty much what Spinner said, also I suspect the very loose knit of the sweater may have helped in this case, combined with my having to wonder if it really was 100 percent wool? Sometimes commercial tags say that, but they really are made of either Super-Wash wool, which can be machine washed in warm water up to a point and/or wool that has between 10 and 25 percent other fibers in it. Unless you spun the yarn itself, it can be very hard to know if the label is "cheating" a bit, although good tourist shops or well known brands are less likely to "cheat" than a discount clothing store.
For washing wool garments (or raw fleece) in a European front loading washer, since you can't turn it off, the next best thing is to put it in a mesh garment bag and wash on a wool cycle. If your machine does not have a wool or gentle cycle, don't wash it in the machine, period. I spent extra money to get a German front loader that had a cold water option on it, so I can wash my hand knits on a wool cycle with the cool well water we have here. Many front loaders, at least in Europe, will not go below about 70 degrees and so may shrink some wool items.
Finally, I imagined the pants had a very tight weave, which is why I will be very surprised if they stretch back out again (although it is worth a try) when I full (weavers word for felting/finishing) cloth instead of stomping on it in urine as they did in the Middle Ages, I wash the item in warm water and then throw into a hot dryer for between 2 and 10 minutes until it "fulls" (aka felts) up down and causes the fibers to catch on each other to make a solid fiber. Otherwise the cloth would be very open and full of gaps, great for a lace shawl or wall hanging but useless for durable fabric.
This is sadly what has happened to these pants, and unlike a knit sweater, the fabric would have been a lot tighter already (and fulled some in the factory already).
But give it a try and please let us know if it works, there is always more to learn and some surprises are wonderful.