Cutting off the socket end of the extension cord is not a great plan, I would use an inlet instead.
Actually, I would go a completely different way. It isn't 1930 anymore and we're not forced into one technology. Instead of having this genuinely dangerous thing in a kid's tree house where you have to tell them "Now children, do not touch this! This technology is not for you"… I would instead pick a technology which is very much for them, and take advantage of the astounding advances in battery, solar and LED lighting and go with a 12 volt battery system, perhaps with lithium or a 10-cell stack of NiMH D-cell batteries if you want to be super safe.
If you're not familiar with this tech, don't worry - your kids will surpass you! LOL Before you know it, they'll have LED strip lighting in the ladder rungs, and probably a WiFi hotspot. But as long as they're playing in a 12 volt regime, they're fine.
The system would be entirely local to the tree house, and would not connect in any way to AC mains electrical.
Solar panels are so cheap and efficient these days that you should be able to get reasonable recharge even in the shade.