Well no, but actually yes.
As others have said in this thread. You can mostly simulate a roof using features, and If need be you can prehaps use an unit, which has the benefits of having access to much more animation options.
Though I feel like what you actually want are units being loaded into the trailers or let's say a truck. In that case what you want to do depends on how you want to implement this.
If you want to make a transport that acts similarly to let's C&C's transport boats then there's absolutely nothing that stops you from doing this. You can make Hercules load units into a box and Spring is perfectly fine with that.
From a physics standpoint the engine doesn't actually care about the models and such of a unit. It really just sees a colvol and a few other things which you define. Having a transport truck teleport units into a enclosed box works perfectly fine.
If you want to prehaps make a moving trailer that units can freely move onto and off of, that would act mostly as a moving platform with a roof. then it's far more complicated. But it's still not out of the question. You can create the roof and floor using the colvol of a unit or feature. The movement of units on it and units coming onto it can be both handled by lua. You'll also probably need to chain all commands issue to locations on that transport to the transport. It'll be very hard but not undoable.