If you connect your iPhone to your Mac with a Lightning to USB-C cable, under the "Develop" nav option (which you have to enable in Safari's preferences | "Safari Settings > Advance > Show Develop Menu in menu bar").
Under Develop, find your phone and then click the site you want to override request or responses for.
Then you will have access to the Safari Developer Tools for that mobile webpage. Go to "Network", find the request you want to edit. Right click and pick if you want to override the request or response. Then edit the file there.
I believe you could edit the HTML, request headers, ect... this way.