The success of the series can be based on how long it has been running. In the case of One Piece that has been running for years, people cannot help but wonder how they still get new material for their show. The creators of the show are very creative. They can think of ideas based on various things. They may get inspired by the things that they see in their daily lives and so much more.
If you are more creative than logical, you can think of fresh new ideas easily. There is a time when they get inspired by other anime series too but they can change the whole concept that you will not even realize that another thing was the inspiration for the episode.
The way that long running shows like One Piece get new ideas for episodes is really just dependant upon the creativity of the team of creators who are in charge of creating new content for the show.
There are little tricks that can make it a little bit easier like watching a lot of other anime series and using stories and story arcs as inspiration but recreating them into something original for their show. Episodes which do not continue the plot are called fillers and fillers can help creators take some extra time to think of new ways to extend the plot or the story arc.