Are thru axles enough protection for transporting a bike? I am travelling with my road bike packed inside my car in the next days. While thinking about how I will fit it in my trunk, I remembered that a lot of people put some sort of spacer in their fork/frame dropouts to prevet any damage from forces that are compressing the fork/frame when no wheels are installed.

Although this is probably more important when traveling by plane, when the bike is packed up in a container and has to sustain the harsh handling that airport luggage undergoes, I was still curious about this.

So to the actual question: Do thru axles screwed into the fork/frame without the wheels offer the same protection as special spacers made for bike transportation or is it worth getting some special equipment for this?
No - does your through-axle have shoulders to stop the bike being compressed from the side?    If it did, then the axle wouldn't go into its hole. 

You're better off using a well-sized block of wood between the dropouts, and perhaps tying or taping it into place - mind out for tape adhesives on the paint/frame.  Or put a stout box over the rear mech and dropouts.