My own experiments indicate there's no limit to the number of avatars that can sit on a prim, using a single script. You treat each avatar as a prim in the linkset and move them around to keep adding space for them. You don't need to check for avatars sitting and standing, you just call llGetNumberOfPrims() on changed and then loop through non-root prims and recalculate everything based on what you see. You get the key for each prim, and check the owner, and if it's owned by itself it's an avatar.
Also you don't need a permissions event to change animations for new sitters, because you can call llGetPermissions right after llRequestPermissions, and then give up permissions right away in a single loop.
Yes, this is hacky, but after seeing Strife's list optimization hacks and helping keep them from breaking in Mono (CIL and LSO did stack operations in the opposite order from each other, and after I pointed that out LL changed the code generator for CIL to evaluate subexpressions in the same order as LSO), I don't think there's any limit to the legitimacy of hacks in LSL.