One common practice is the sign every page on a hard copy and to initial every other page of a hard copy, usually with blue colored ink on a black and white original, and to maintain a copy of the original as authoritative.
Most electronic digital signature systems have some sort of authentication protocol.
One can also maintain a copy of what you signed in some way that can be authenticated (e.g. with metadata).
Certainly, a sophisticated party can find a way to fabricate or forge almost everything, but this doesn't come up very often because most merchants engaging in contracts with lawyer drafted written documents almost never, as a matter of empirical reality, actually do that, and because the lawyers acting as intermediaries have ethical obligations independent of and superseding their duties to their clients not to engage in that kind of fraud and not to submit false evidence. Also, when someone is discovered to have done something like that the implications are often not limited to that transaction and can instead also result in criminal charges and/or loss of professional licensure and punitive damages.
Has there ever been a case where a lawyer and a business client have conspired to engage in outright forgery?
Certainly.
But, it doesn't happen often and one takes enough precautions to make it unlikely and then lives with the risk. The risk if a function of who you are dealing with.
For example, most transfers of commodities on commodity exchanges in the U.S. and publicly held securities listed on securities exchanges other than the NASDAQ aren't documented by written contracts at all, and instead are conducted by oral agreements documented in writing in the personal business notes of the parties.
Similarly, most decisions of the boards of publicly held corporations and governmental entities are made orally and then documented by a secretary of the meeting in minutes, rather than in documents executed by the decision makers. In each of these contexts, there is a sufficient basis for trust that signed documentation is not needed, in part, because the people interacting constantly interact with other other in transactions large and small, and no one will continue to do business with someone who proves untrustworthy.
When the risk is high and the stakes are particularly great, one can not only use an original wet ink copy but entrust the original for safekeeping to a trustworthy third-party.
In Continental Europe and many other "civil law" countries that don't follow the English Common Law legal system, notaries serve the role of third party custodian of important contracts in a far greater share of significant, legal professional drafted contracts and legal instruments than in the U.S. and other common law jurisdictions.