In principle yes, but under some conditions, that in practice could mean no. And don't take my word for it, it's your own risk.
I found this and this link very helpful as they provide more detail than you would usually find when the 72h visa-free transit is explained. (See also this own answer to a question of mine.)
So if step 3 of your journey is actually confirmed and you have a seat on the plane by the time you arrive at Chinese immigration, they should let you in (at their disclosure) and you are fine. The problem is that when you board your first flight (Osaka to Beijing or whatever the first leg of that journey is), they airline should and will check if you have a visa for China. If your booking for the Beijing to Europe leg is on another ticket they might have no means of verifying your outbound flight and deny you boarding. A good way to ship around this problem is to have both the Osaka -> Beijing and the Beijing -> Europe leg on one and the same ticket/booking, i.e. a stopover, even better if with the same airline. In the best case you might already be issued your boarding pass for the second flight in Osaka. Be prepared to tell whoever checks you in in Osaka that you will use the 72h visa-free transit and show proof of your onward flight.
The same holds at immigration in Beijing, have a boarding pass for the second flight ready or at least a printout of your booking. I hear they have a special booth for 72h visa-free transit in Peking airport.
It might be a good idea to get this booking from an actual travel agent instead of a website to make sure.