” to have happened ” is an infinitive, the same as ” to happen ”, just a past tense infinitive.
- Infinitive cannot be broken.
- ” not ” must always be before the infinitive, just the same as in ” would not happen ”.
Therefore, the correct way is : ” would not have happened ”.
The incorrect way is : ” would have not happened ”.
With abbreviations, because of a lack of any other way, the correct way is ” would’ve not happened ”, because the abbreviation ” would’ve ” cannot be made into ” would’nt’ve ”.
Because of the abbreviation, many people use the incorrect way without the abbreviation. This and other mistakes with present and past perfect tenses are very common in the Southern USA and, even, have become a part of the local folklore.
Even more incorrect : ” would not have had happened ”, ” would have not had happened ” and ” would have had not happened ”. ” had happened ” and ” have had happened ” are not infinitives. There is no infinitive more past tense than the past tense. Thus, even in conditional sentences, the ” more past ” infinitive is not an infinitive.
https://en.wikipedia.org/wiki/Infinitive
Section : ” Marking for tense, aspect and voice ”.
Please, note : Some native English speakers omit ” to ” in the past tense of must ” had to ”. ” Children had better listen to their teacher. ” is the incorrect form of ” Children had TO better listen to their teacher. ”. The more past tense of must is ” have had to ”. ” Children would have had TO better listen to their teacher. ” may, incorrectly, be abbreviated to ” Children would have had better listen to their teacher. ”. This is a different subject than the original question, but, is good to mention.