Do not do this.
First, always consider the consequences of a misconnect. If you are connecting to a destination with hourly service, it is no big deal. Here, you are connecting to a 1x/daily flight which itself connects onward to DXB. Given packed aircraft, a misconnect could mean a 1-2 day delay in actual arrival at DXB.
Second, you could misconnect even if UA is ontime. If UA is late, it it UA's obligation to rebook. If UA is ontime, it is up to LH to rebook if your fare rules provide for that. LH can be quite rules-oriented and may simply tell you that you had a legal connection and no showed. Your ticket is cancelled and you must purchase a new one (if that is what the fare rules provide).
This is all about risk tolerance. I would not try this unless I had "must do" events on both sides of my schedule.