Does the Market Select for Stupidity?

Since machines have become capable of serving and repairing machines, less humans are needed. And in future machines will probably even be capable of inventing machines, then no human will be needed. But will the humans have to be intelligent then (provided that they will still be there)?