Minor quibble: Hamilton the musical is based on the biography of Alexander Hamilton by Ron Chernow. So while Lin-Manuel Miranda did arguably know a lot about Alexander Hamilton once he had read the book, I would say that his unique contribution was not (musical theater composition) + (Alexander Hamilton facts), but specifically the idea that a biography of a historical figure most well-known for being killed in a duel with a former vice president was, in fact, material that could be adapted into a musical. (And furthermore that it should be a rap musical.)
Anecdotally, I know a guy who wrote an opera using the transcript of a routine small-town city council meeting as the text, but it didn't become a hit.
Ergot is toxic and eating contaminated bread has been a historical problem, but the results of ergot poisoning, contrary to pop science/history accounts, don't seem to be much like the results of LSD, although there is a neurological component. It is plausible that the evolutionary "purpose" of the alkaloids is to poison animals that eat it, but whether the benefit to the fungus comes from decreased predation, improved dispersal, or something else is unclear.
Certainly there exist fungi which produce psychoactive compounds in order to alter the behavior of an animal, such as the charming Massospora cicadina, aka the cicada sex zombie fungus.
Also: Did Albert Hoffman hit the most powerful variant on the first try? No, he was systematically investigating similar compounds for pharmacological properties (not psychedelic properties, just regular drug discovery). LSD is just the one that had significant novel effects at low doses, and so it is the one which became famous.
The extreme potency of LSD is indeed a critical part of the story; synthesizing it is difficult in part because it's very hard to produce it in any large quantity without incidentally ingesting active doses through the air. According to Wikipedia, the threshold dose to feel effects is about 25µg. Not milligrams, like the active dose of most medicines, _micro_grams. I am sure chemists over the years have gotten accidental doses of 25µg of many tens of thousands of chemicals without ever noticing it. Albert Hoffman's original accidental dose was consistent with a ~threshold effect, so it doesn't seem to be especially serendipitous. He just happened to be the lucky chemist who was working with a chemical which is psychoactive in such trace amounts. (He then intentionally tested a dose of 250µg, which he thought was very small but which is in fact a solid dose.)
LSD as such does not occur in nature, so it has no evolved biological role. It is a semi-synthetic chemical, meaning that it is synthesized in a lab by chemical reactions, but that the usual starting material is biological (typically ergotamine, which is, as you allude, found in ergot).
Regarding the effect of longitude, rather than fiddling with the offset, I think you want two terms, sin(lon) and cos(lon). Together they model a sinusoid with any offset.
Ok, now I understand the type of maneuver you are talking about. That definitely does make sense. I wonder if our hypothetical probe has knowledge early enough about the orbital trajectories of the stars close to the black hole, such that it can adjust its approach to pull off something like that without too much fuel cost. Of course it's a long trip and there is plenty of time to plan, but it seems that any forward-pointing telescope would tend to be at significant risk while traveling at 0.8c into a galaxy, let alone 0.99c before the primary burn. However, "not likely to survive if deployed for the whole trip" is not the same as "can be deployed for long enough to make the necessary observations." One advantage to a "simple" powered flyby of the black hole is that at least you know well ahead of time where it's going to be, and have a reasonably good estimate of its mass.
Alternatively, could it get that information prior to launch, and if so are the trajectories of those stars stable enough that they would be where they need to be after millions of years of travel? My guess is no.
In the typical case, there are (at least) two meaningful bodies other than the spacecraft doing the maneuver; in real-world use cases so far, typically the sun and a planet. An (unpowered) slingshot maneuver doesn't change the speed of the spacecraft from the frame of the planet, which is the object that the spacecraft approaches more closely, but it does change the speed in the center-of-mass frame, and it works by transferring orbital energy between the planet-sun system and the spacecraft. But the key is that in order to change your speed as much as possible relative to the center of mass, the object which you approach closer (i.e., "slingshot around") should be the object which is smaller, and thus has higher speed relative to the center of mass. Of course it still needs to be much larger than your spacecraft. In no case would that object be the central black hole of a galaxy, unless your goal is to reduce your speed relative to an even bigger nearby galaxy, or perhaps just to change direction.
Are you talking about some other type of situation? My orbital intuition is that if you are going to trade orbital energy with a system, you have to get close to it relative to the separation of the bodies in the system, so it will generally make sense to talk about slingshotting around one of the bodies in particular. This is especially true when you are approaching with much higher than escape velocity, so that an extended dance with more than one close approach is not possible unless the first approach already did almost all the work.
I suspect another issue is that it's too dangerous to fly at 0.99c as you are entering a galaxy. There's too much gas and dust.
If I understand correctly, the Penrose process as such (i.e., actually extracting energy from the black hole's rotation) only works if your exhaust is expelled fast enough, relative to you, that is is put on a negative energy orbit, which necessarily falls into the black hole. I'm not sure how you could perform a retrograde burn in which your exhaust somehow enters the black hole but you don't, since in a retrograde burn your exhaust is getting extra orbital velocity.
I am still really curious whether it helps to execute the retrograde Oberth maneuver within the ergosphere of a Kerr black hole, and if so whether it is better or worse, or even possible, if you approach on an initially retrograde orbit. Of course the approach orbit is probably steeply inclined because you don't want to spend any longer than necessary flying at 0.8c through the galactic disc.