Lay the bike on its right side (after draining or using half a tank). You won't lose any oil. The dowel pins can definitely fall into the engine but rocking the side cover gently as you pull it off helps. Since you are aware of this possibility the first thing to do is look to see where they are. If they stayed with the side cover put them back in the engine with some heavy grease to hold them.
The big danger when changing out the front sprocket is pinching the stator wires. When you get the cover started on the pins don't push it all the way on until you have inspected the wires and the little rubber plug from the chain side and verified that they are still in place.
Make a cardboard mock-up of the side cover and place the bolts in the holes as they come off.