Chart Color Palette for hundreds of items

Given a timeline chart with hundreds of items...should I have hundreds of different color for each category/item along?

What is a good strategy for creating colour palettes for charts when there are a large number of items/categories?

Here is an example...but will have more devices on the chart (hundreds) The 5 lines on the chart = 5 different devices enter image description here