All materials that involve stagnant cold water pose a risk of Legionella contamination, including bubble tubes. However, the risk is negligible (there can hardly be any aerosol formation due to the small hole in the lid), especially in combination with demineralized water and regular use.
Therefore, always ensure the bubble tube is used regularly, preferably every day. Replace the demineralized water annually. Always refill with demineralized water. If a bubble tube is inactive for more than a week, it is best to change the water and rinse the tube with water warmer than 60 degrees to prevent any contamination.