Similar functionality was added in SDV 1.4, so this mod is no longer supported.
See This link for the NexusMods mod page, which has a description, screenshots, and a download of the built mod.
The mod uses Harmony to overwrite the horse's checkAction
method to instead remove the hat the horse is wearing if it is wearing one and the player is holding down the activation key.