Hello brother, this sentence is perfect, but maybe you would understand better with easier vocabulary : for example, accoutumer means habituer, (accoutumance/habitude), and "le plus sûr moyen" is usually "le moyen le plus sûr". So, "savez-vous quel est le moyen le plus sûr pour que votre enfant soit misérable? c'est de l'habituer à tout avoir". Makes sense?
The point of the sentence is to say that if you give everything to someone, he won't ever look for it, he won't fight for it, as if everything was easy and free, and that's the best way to make him miserable.