Origin: of the phrase 不让[能]踩门槛
I don't know if my answer is absolutely right. 
There is a famous book named Di-Zi-Gui (弟子规）from Confucianism（儒学）. You know, Confucianism was prevailing for a long time in China. As I know, Di-Zi-Gui is a book to teach children moral precepts and standards. 

《弟子规》：“勿践阈，勿跛倚，勿箕踞，勿摇髀……” 
The first one is 勿践阈
 勿 means 'don't 不能',践 means ‘踩’，阈 means ‘门槛’

However, I don't know if this is the earliest usage. From my memory, I was told by my grandparents that 门槛 means all the trouble and setback in our life，we better walking cross the trouble instead of stepping right onto (踩到）the trouble. So that is what we usually do in temples--不踩门槛，跨过门槛。
I hope this is helpful!