I have used a circuit that measures current and stops the motor when the current increases when the motor stalls at the end of travel.
However, you need a timer so that the motor can start, or the current peak when you first energise the motor causes it to stop immediately. You also need a timer to stop it eventually if the current doesn't peak. The normal operation relies on the current peak being significantly larger than the running current. That has been a problem on car windows where there is loads of friction, and that is worse in the winter than the summer, and I don't have any way of testing a whole car at low temperatures.
It ends up fairly complicated, so I did it all inside a microcontroller. It's not got a large component count, but if you haven't programmed microcontrollers before, there is a lot to learn.
If you did it with OP-amps and timers, there is less to learn but it is a more complicated circuit. Either way needs quite a bit of adjustment for your application.