There are industrial grade ultrasonic sensors that should be able to handle this task.
2 of 2 people found this helpful
There is an Omron optical sensor that works with transparent material. I demonstrate it here here with glass and plastic: https://www.element14.com/community/roadTestReviews/3403/l/omron-sensor-evaluation-board-2jcie-ev-review
There is a 2-10mm version, I tested the version that works from 10-55mm. Page down to the bottom and look for the B5W-LB2101-1