That could still leave someone benefiting from the trap who neither made, placed or maintained it, not to mention the requirement for the server to check for every player in the chunk, and parcel out the experience evenly between them. Admittedly, on the OFFICIALLY supported maximum of 8 players, that probably wouldn't be a deal breaker, but it would be added processing load for the server.
Any way it's done actually would be explotable I reckon.
For example, assign the XP to the nearest person? I hide out at another players base (perhaps under 2 dirt blocks for example). My bases chunks are inactive due to lack of players, and the other players base cops all the heat, and having hid directly underneath their traps I reap the rewards (indeed, you could actively place torches to ENCOURAGE the use of the traps).
Assign XP to the builder? I go to someone elses base and replace all the traps in the stockpile with ones I've made myself.
Assign XP to the placer? As above, I simply replace all the traps they built with identical ones.
At a minimum, it would seem to require another meta-tag added to each trap, of "XP assignee" for most of these methods to even be possible I would expect.