Are thru axles enough protection for transporting a bike?
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.