But when I load this again (making sure that the profile is available in my resource set), resource.getContents() only returns the ModelImpl object, the (formerly existent) DynamicEObjectImpl object is gone. Obviously, it is not created when parsing the line

Yes, you are right. However, your answer was helpful, it pointed me to the right location in the code: I figured that the parsing correctly created the DynamicEObjectImpl object, but I think I need to manually add this element to the resources associated with the model. So, it's my fault so far, as expected of course...

Just to make sure - have you tried invoking myModel.getAppliedProfiles()? Does it fail with an exception, return an empty list, or returns a singleton list with the profile object? What about myModel.getAppliedStereotypes()?

Posting some code (and models) that shows what you are seeing would help.

I was sure that getAppliedProfiles() works, and it indeed does. My problem was, that I've got some long forgotten "high sofisticated model management code" that spoiled everything even after I perfectly did everything right. After fixing this code, everything work fine.