There is nothing more demotivating than realizing that the person in charge of making technical decisions has no idea what he is talking about. You have no authority to make good decisions or hope of explaining things to willfully ignorant management. All you can do is quietly implement their stupidity and hope to avoid the fallout.
I think one of the biggest saps of motivation in that situation is that even successes are meaningless. Because one instinctively doubts the whole thing then (even a broken clock is right twice a day, but it still doesn't make one feel great).
There is nothing more demotivating than realizing that the person in charge of making technical decisions has no idea what he is talking about.
Maybe it's simply a question of different semantics, but I've never worked at a place where my boss was in charge of making technical decisions. That is always done by whatever senior engineer is in charge of that particular project.