How to disable individual USB ports by script?
Have you seen this thread and the code here? Maybe shell could be used to "manually" rename the device ID or port to something odd that won't work, upon a specified event, then renames it to what it's supposed to be later.