Well, there are not many on here who could help with plugin development. AFAIK, Marius, SnowHow and myself.
I'm not sure if hooking on track change will work, because TrackChanged() is called after current track starts to play and after playlist has changed, which may result in new tracks added to playlist before you can react. You should also note that this method is called from a separate thread.
Instead, your plugin could use PlaylistChanged(). Despite its name the it is called before playlist is changed. Your plugin could modify the playlist even before Plugin_Playlist reflects changes in UI if your plugin is loaded before Plugin_Playlist, which is determined by *.dll file order in Plugins directory.
Since RadioDJ does not keep track of total playlist duration, your plugin will have to iterate over playlist items and sum durations to determine if tracks fit in the hour.
If the conditions are met, stop Auto DJ and do your magic.
That could slow down Auto DJ but I can't tell for sure without testing.