I remember reading that the transporter was added to TOS mainly to speed up storytelling, with the technobabble behind it being expanded on later. Then replicators/holodeck put in TNG because it made sense based on similar technology. So basically you’re exactly right, it is magic
Nice job!