An enclosre sounds a great idear, anything to keep him safe. All you need is a bit of imagination if you can do DIY.
Make four sides from some kind of strong mesh, four poles for corners, maybe mounted on bricks to keep them firm oh yes a doorway lol and best a top too. Lupin my cat can climb mesh.........sigh, acyually he can climb most things!
Once you have the box with door you can fit out with trees and stuff including some where he can get in shade.