I don't believe your approach to check out objects is a good one.
The first thing to look into would probably be if the import options support what you like to accomplish e.g. by not allowing updates. This could work if you generally want to protect existing objects being updated during the import but I feel it is not sufficient in your case.
My next best idea would be to maintain a list of objects you want to protect against updates. The list could be used to pre-process the XML by removing listed objects before performing the actual import.
Thank you for the idea of pre-process the xml,
And why do you believe the 'check out' approach is wrong?