I am using this code to embed a playlist:
YouTube prevents hiding related videos using rel=0 as of September 2018.
However, you can work around this by using the YouTube Player API to show custom HTML instead of related videos.
Here is some example code that displays a custom "replay" button over the video once it completes, hiding the related videos:
For the most up-to-date code, including the minified version, description, demo, and instructions, view my blog post on the subject.