I think ít is very safe to assume that the OP/Rasmus purchased CPH-CUN as one ticket/1 PNR. If Rasmus had purhased the MEX-CUN separately Rasmus would most likely also realise that this ticket would have no influence on the separate CPH-MEX return ticket (after all he is Danish!) and most likely Rasmus would never have bought the add. ticket to CUN if the intention was only to fly to MEX for the outbound.
Codehare, interline agreement or whatever has been mentioned here has absolutely zero importance to what Rasmus is inquiring about.
But let's get back to Rasmus' concern: The answer is very short/clear: If you skip the MEX - CUN segment then most likely LH (or whoever issued the ticket) will be notified that you no-showed for the MEX-CUN leg and the remaining ticket will be void, i.e. you will not be allowed to check-in for your return flight from CUN.
Secondly, at check-in at CPH the agent will most likely not be prepared to short-check you bag to MEX only (they will realise what you are trying to do!) and you bags will be tagged to CUN, i.e. you will face issues and questions when you try to retrieve the bags at MEX.
So in all a very bad idea (but good that you actually considered it and asked in this forum - many would just have done it due to ignorance about no-show rules and would face serious issues when they try to check-in for the return flights). What you could do is either to buy a cheap CUN-MEX ticket that fits with your incoming MEX-CUN flight (yes, it sounds crazy flying to CUN and then going back again to MEX, but you need to do it to protect your return flights, CUN-ORD-CPH) - or you inquire with InterJet (when you arrive MEX not before) about rebooking the MEX -CUN flight to a later date that suits you. Be prepared that InterJet will charge you change fee + possible upfare for you to rebook the MEX-CUN segment (which may be an considerable amount) - or may simply refuse to touch the ticket and ask you to contact the issuing carrier for rebooking. Good luck!
Last edited by SK AAR; Mar 19, 2019 at 9:45 am