A pedal hit in the shin always happens to beginners, but I didn’t encounter this accident for years (but I just do very basic stuff like… Riding).
If you don’t have proper shin guards, you can use cardboard, it does the job very well.
When you’ll start being comfortable with your unicycle and start to dismount from the back… Always pay attention where you put your feet.