I think this view has changed over time. Polonius’ advice was my late father’s favourite passage in Shakespeare. I was surprised, at university for a degree in Literature, to hear that it was thought of as a bunch of passé rambling.
And nowadays I agree 100% with my dad - it’s great advice.