I think you can use
/execute as <selector> run replaceitem entity @s enderchest.0 minecraft:stone
to change the contents of someone's enderchest, but that doesn't really show you the contents of their ender chest.
I also think that you can use /data modify to copy the contents of someone's ender chest into a normal chest where you can view it there, but I'm not too familiar with /data modify. I tried something like:
/data modify block 73 4 53 Items set from block 74 4 53
That didn't really work, it just cleared the items from the chest, one by one. I'm assuming that this is because the ender chest is stored in the player data, and that the actual chest is "empty?"