Yes, pipes don't work in this scenario because the script drush calls a container and that process inside the container can't read from the pipe. We went away from using pipes completely, so <, > or | are not used at all.
For the above use case, there is even a better one: drush sql-cli --file=drupal.sql
Just for the records and if others ever come across this issue, what's the difference between drush sql-cli < dump.sql and docker-compose exec -T php drush sql-cli < drupal.sql where the first fails and the second succeeds:
drush sql-cli < dump.sql is executed in the l3d container, so the pipe runs in l3d, but drush switches context into the PHP container. So, the process and the pipe are "on different hosts" so to speak.
docker-compose exec -T php drush sql-cli < drupal.sql on the other hand takes drush sql-cli < drupal.sql together into the PHP container, so that process and pipe are running on the same host. And that's why this one works.