Is cycling behind a truck a bad practice?
It is really dangerous to follow a large vehicle closely. It is possible behind a directeur sportif in a passenger car which is smaller: you can see through it, and the driver is a cyclist who knows you and knows about you.
You cannot see what is coming in front of the truck. If they choose to brake hard, watching the brake lights will be of no use; you have simply no chance to brake so fast as many cars can (the truck can be unloaded or transporting light goods). You do not see what kind of obstacles or potholes are coming, how the truck will avoid them, and so on.

Note that I was assuming a road bike without any front suspension fork.
Ride On says &quot;Cars will generally stop faster than bikes due to their more efficient brakes and lower centre of gravity,&quot; and they indicate a bicycle stopping distance of 31.5 m from 40 km/h. However, take into account that this is from a prepared rider who knew he had to slam the brakes, not just noticing a brake light. A passenger car will stop at something like 26 m.
Even for motorbikes it is dangerous, and the stopping distance can vary with the experience of the rider by a factor of 2. [1, 2]
And of course, even a car tailgating another car will often crash into the preceding one. The two-second distance is often required by law. That is 22 m at 40 km/h and 28 m at 50 km/h. That is not compatible with drafting behind the vehicle in many, if not most, traffic rules.