Are you building the lid like that for storage reasons? FrenchieXJ is right, you could just attach the tent to the lid but then you would either have to make your lid much taller or deal with the tent being lower. You could build your rack attached to the lid as high as you like and use struts to lift the lid, rack, and awning all at once for access. That's a lot of weight to move when you want to get into the trailer though. I would build your lid then build a trailer (or frame) mounted rack that can telescope up and down for setup/transport. Once it's setup at a campsite you could open/close the lid independently without disturbing the tent/awning every time you need to access the inside of the trailer.
My trailer has a rack that is about the same height and my tent, awning and solar setup is about the same weight, maybe a bit more. The loaded trailer weighs about 1200 pounds WITHOUT the tent. I have had it in a couple of scary situations and thought it was going to go over on its side, was on one wheel once. Getting the weight as low as possible is the best thing to do. When building it initially I didn't have the budget to do this but now 2 years later it's become a priority. I'm working on telescoping the legs of my rack and having it raise/lower with linear actuators. I'll have 16" of travel so I can still get full height to deploy my tent's annex and not hit my face on the awning (only reasons I want it to be so high) but get the added stability of having all that weight as low as I can get it for transport. This will also place it below the roof line of my tow vehicle so that will help my fuel consumption on the highway a bit too. I have a soft cover on the trailer so access is a little easier but still the same idea.
I've also considered using gas struts and a cable/pulley system to pull it back down. The biggest issue with a tent that heavy and gas struts is they need to be so strong that its very tough to pull back down for transport, especially with one person. My thoughts were to use the struts to hold it up then use a separate cable for each post (could even be inside the posts), affix the cable to the top of the post, run it down to a pulley at the bottom then onto a small hand crank or electric winch located on the tongue. If each post has a setup like this you should be able to pull it down evenly against the force of the struts. Might take some experimenting to get it right but could work. I went the linear actuator route because it seemed more simple