Toggle Caps Lock After Set Time Period

Hi and welcome to the forum!

People have tried toggling Caps Lock with AppleScript with various levels of success. It doesn't seem that dependable to me.

Perhaps these command line tools might be of interest.