It's most of the way there, remove the obsolete methods on ContainerManagerComponent and run the container.Init calls in a ComponentAdd handler instead of in two seperate places (ISerializationHooks.AfterDeserialization and ComponentInit)
The comment saying this is difficult seems outdated.