"Everything in the world is magic....except to the magicians."
- Dr. Robert Ford, co-creator of sentient machines/Westworld
More in my experience was the way an old engineer once put it, upon someone calling something he did "magical", the old engineer scoffed at the idea...."nothing I did here was magical, it's just an indication I've been doing this a long time....anything that seems magical is just not documented thoroughly enough.".
The problem with the lore of Magic is that it's other-worldly, secret societies , alternate dimensions, and several zoos full of mythical creations and dangerous organisms.
Approaching it non-methodically is problematic at best, and something that eventually we'd have to deal with. As a society the scientific process would HAVE to be brought to bear, on the entirety of the magical world.
It's not after all magic, it's just an aspect of nature or something about the natural world that's VERY close at hand , that is not discovered.
For example, you have a provable example of Gryphons or the fact that death itself can be counteracted or there are processes that can allow one to alter time.
This creates a whole set of circumstances that would be important to our species overall, muggles and magical folk alike, and eventually all of it would be part of what we do as a society.
So the vast bulk of magic is craftwork/trainable stuff that you can use in every day circumstances.
Some magic is wildly dangerous , akin to nuclear weapons or biological weapons. As we see from the lore, whether it's Harry Potter, or the Lord of the Rings, or Marvel Universe; we'd need rules, as they say over in /r/Rimworld the "Geneva Suggestions" for magic. Of course not everyone might adhere to those protocols but just imagine what we'd be capable of as a species, both terrible and terrific in terms of it's potential for our local star-system , and indeed the galaxy.
So take teleportation, transportation, particularly initial explorations of things, would be radically transformed, why bother slowly sending rockets and engineers to Mars, Luna or Mercury when you can build and send an entire city to these places by teleportation.
There are real and serious engineering questions, is the Hocus Pocus of disappearing pigs, scalable at an industrial level....can it be automated, perhaps it's best to use that for emergency responders to miracle critically injured patients immediately to an ER.
Or what is to be done with creatures like Deatheaters or other perhaps nastier creatures that lurk in areas ill-explored even by those with a deep understanding of Magic.
In this way, The most interesting Lore/world is that I think of Avatar, where there are societies where a type of telepresence and telekinesis exists as a "real thing" and some people have it and some people don't.
In the science fiction series Babylon 5, the notion of telepaths is explored, and in many societies they form a particular caste or group of specialists, of course in Terran society, they become a separate society, that thinks itself better than "mundanes", and if anyone thinks this sounds familiar it should.
Ultimately,
It's not a question of JUST how we deal with the craft and engineering , it's easy enough to say Hogwarts becomes a satellite campus of Oxford University and that's that.
But really it's a story about something we can't really have. It's really about how we as a society stay informed on matters scientific, it's a strange siren's call, back to a "simpler" age , with obscure knowledge and secret societies which creates all the problems that go against the decidedly unromantic notions that modern industrial/technologically advanced societies have to deal with.
It's a HUGE problem that we deal with in fits and starts, how do you impart to everyone in society the notion of responsibility, of having to learn stuff you might not like , so you as a citizen or we, as a society can make informed decisions.
So Hogwart's needs an OSHA office, and a hospital, and a major rethink on how students are trained on potentially dangerous magic, that would be one classroom over from how students are trained to deal with acids or microbiological agents, or creating AI's, which is across the hallway from an Ethics and Civics class, and a class in statistics, and just around the corner from a class in best practices for experimental methods and design of experiments, which is just around the way from the office of safety.
Hogwart's, and other magical schools, would be FAR less romantic, but also far more important. Magicians would take their place not as great mages and obscurant sorcerers and witches, but as venerable engineers, artists and scientists, doctors and legal scholars, auror's become detectives, and prosecutors; in short Magic is transformed....into science.
Of course there are those who would say "we loose the magic in the process...", which is just not true. The threshold of science exists, and will for thousands of years to come; even if it's not in our common experience, and that threshold is nothing if not magical.
Scientists of every stripe will tell you of the exhilaration or trepidation of discovering something new. Just as artists will tame or entertain their muse, so too scientists combine creativity with craft at the edges of science and create new knowledge for humanity. So be it the vaccine that saves millions, or the machine learning algorythm that passes the Turing Test with flying colors, or the rocket that makes interplanetary or interstellar travel more safe, commercially viable and commonplace.
When you know where to look, magic is all around us, every day. We just don't often think about it as magic.
If you or I went back 1000 years and tried to explain this conversation to someone, that's probably the only way they could understand it, I'm magically communicating across the entire planet to any number of people, this radical notion, that each of us...every day....performs magic....we just don't recognize it that way.
And we didn't do it because we all became knowledgeable in some obscura or secret knowledge, we were able to do it because some rather smart people decided to make a tool that did some tiny , tiny portion of this process, and some other rather smart person came along and built on top of that.....and this process as repeated for thousands of years; slowly at first.....fire....the wheel....agriculture....gunpowder....the printing press...the internet.. all of these inventions were the result of a patient examination of nature and sometimes painstakingly slow research, and sometimes wildly radical epiphanies.
And there's the rub, the great paradox, when you realize....we are the magicians....where the muse of mythical times that would inspire the wizards of old....still visits ....the mages and sorcerers of our time....those students and professors and learners of skills that are still obscurant and in one single ESSENTIAL moment is transformed from myth and lore into science, there is but one rule, that one must convince the always skeptical eye the rigorous test, a rule that says "prove it.".