Give him a job!!!

Shepherds need to be busy busy busy. That is what they are bred to do and love to do.

A tired dog is a good dog. Get him a Kong and stuff it with goodies and put it in the freezer and then let him have it when he goes out.

I can't say it enough. JOB JOB JOB WORK WORK WORK! He is indeed not a stupid dog, just a bored dog. Give him some GOOD LONG exercise and see if that helps at all. Combine the Physical exercise with Mental exercise and see if he gets any better.