Can't help wrt content authoring, but in case you need some help during the race, Crew Chief supports warning if your stall is occupied. You could also script SimHub to detect that.
AFAIU, @Jimmi Allison has helped leagues set this up for official content. And the little bit that I've looked at it, it looks like adding extra pit stalls is possible in official tracks as that part is not encrypted.