My understanding is that you should be fine to enter the UK in this scenario under the TWOV rules. The only issue would be if the border agent does not believe you will take your onward flight, but that shouldn't be a problem if you have the relevant details and no suspicious flags about you.
The good thing is, in the (unlikely) event they say no, you should simply be able to remain airside and connect that way.
This is assuming your booking is all on one ticket. If not, you might have more difficulty convincing UA to let you board in LAX.