What is the most fair way to scale grades?
I think the unfortunate truth is that the only fair scaling of grades is to not scale them at all.
Outside of the mathematical framework you want to consider, curving or scaling grades can only penalize those students who work hard and would have otherwise received high grades. Particularly in the case of a flat curve (where everyone gets $+x\%$), I find it to be the definition of unfairness that someone could receive an A when they only did enough correct work to earn a B, or heaven forbid a C.
But the unfairness doesn't extend to just the student body; if there are scholarships tied to GPAs on the line, organizations might end up misspending money on students that aren't actually doing the work that they should. Employers might end up passing over a candidate with fewer credentials (but who would be a better fit) because they think that someone else has a better transcript. And so on...
But, even in the context of the model you have presented, in both of the metrics you have proposed the map $\phi:[0,100]\rightarrow[0,100]$ which is the "fairest" is just the identity map. By not curving at all, you are always guaranteed to be fair.
Now, you can argue that in order for the identity scale to be fair the professor has to do their job correctly and adequately, and that the inability of universities to promise that professors are doing their jobs well is why we tolerate curves, but I think the solution should simply be to fire those people who can't teach, or at the very least don't let them teach anything, rather than alter the metric by which we judge mastery of topics, particularly when the rest of society has to use that metric to decide who gets the contract to build that bridge (or any other "important" function that an individual might serve).
This is a cute little problem. I have several things to say about it. Before I do, let's introduce some notation.
Define $d_\phi=\sum_{i=1}^n|\phi(X_i)-X_i|$, and let $[a,b]$ denote the target class average. (You have set $[a,b]=[65,75]$, but the numerical values don't really matter as to the structure of the problem.) Without loss of generality, suppose $X_1\leq X_2\leq\cdots\leq X_n$.
(1) Notice that we don't really need to find a function on $[0,100]$. Rather, we just need a function from $S$ into $[0,100]$.
Obviously, if $\mathbb{E}(S)\in[a,b]$ then we let $\phi$ be the identity operator. The remaining cases are where $\mathbb{E}(S)<a$ or $\mathbb{E}(S)>b$. But...
(2) Note that under realistic circumstances we must always have $\phi(X_i)\geq X_i$. With this additional constraint, it may not be possible to find $\phi$ satisfying $\mathbb{E}[\phi(S)]\in[a,b]$. In particular, if $\mathbb{E}(S)>b$ and $\phi$ is anything but the identity map, then $\phi$ will only decrease fairness (i.e., increase $d_\phi$) while separating the class average further away from the target range. The only case that remains is where $\mathbb{E}(S)<a$.
(3) If $\mathbb{E}(S)<a$ then we can minimize $d_\phi$ subject to the constraint $\mathbb{E}[\phi(S)]\in[a,b]$ by guaranteeing $$\sum_{i=1}^\infty\phi(X_i)=na.$$ Clearly, such a function $\phi$ exists, and is not unique.
(4) Note that ideally we would also wish to minimize the quantity $$\|\phi(S)-S\|_\infty=\max_i|\phi(X_i)-X_i|.$$ In fact, in real life I should think that this is a greater priority than minimizing $d_\phi$. However it turns out that there is a function $\phi$ which will minimize both. For instance, we could simply find $c\geq 0$ such that $\mathbb{E}(S+c)=a$, provided $X_n\leq 100-c$. Of course, this may not work in general since we might have $X_n>100-c$.
Fortunately, this is not a great difficulty. The function $\phi=\phi_c$ is now given by the following: $$\phi_c(X_i)=\left\{\begin{array}{ll}X_i+c&\text{ if }X_i<100-c,\\100&\text{ if }X_i\geq100-c,\end{array}\right.$$ where $\mathbb{E}[\phi_c(X_i)]=a$. There is a unique solution to this problem, and although it is annoying to compute in general, it's quite easy to compute given some concrete set $S$.
(5) Let's get back to real life. A grading scale is stipulated by the syllabus, which is a contract between instructor and students. And although it is technically permitted for an instructor to go Darth Vader and alter the deal at the last minute, it's almost always a very bad idea.
If you have any freedom for curving, you should look at the students rather than use a silly math formula. You should ask yourself, "judging from my impression of his work, is Joe student ready to pass this course?" People like to pretend that grading is objective. It's not. You have to make judgment calls. Math can help you with that, but at the end of the day you have to make your best call.