Yes, but the "moral" was the fact that he had told Delilah about the secret of his strength in the first place. His downfall was allowing himself to be seduced. Obviously the guy was pretty dumb since Delilah had already betrayed him, what, twice?
______________________
I went back and read the entire tale.
At this far remove, I have to say it is poorly told as a story.
Samson would actually have to be clueless in intellect to fall for the same trick over and over and over again.
The scriptures say Jehovah wanted Samson to be with the Philistine woman because He needed a pretext to take them on.
This doesn't sound like fair play in approving of the affair and then punishing the man for acceding to it.
But then, Old Testament Jehovah could be a real prick.