There’s probably an element of ‘it depends’ involved.
The end caps dont take much load into the dropout on most hub designs, the load all goes through the bearings and onto the axle itself, the end caps just prevent it sliding up and down the axle. Even if it’s a design where the end cap sits inside the bearing then it’s just spreading the load onto the axle.
The obvious exception would be qr hubs which sometimes don’t have an axle at all and just rely on the end caps pressed into the bearings.
Having said that some hubs. Notably the original pro2 had a habit of snapping though axles which moving it 5mm out might exacerbate. But if it’s fine normally it’s probably still going to be fine.