TL;DR: you have nothing to worry about.
The risks that you described are nothing to be worried about with TDAmeritrade, Fidelity, Schwab, Merrill, eTrade and similar large brokerage firms.
First, the transfer agent for a company is the official record of ownership. The transfer agent has a record that says you own "50 shares IBM" held in 'street name' at TD Ameritrade. So, even if TDA ceased to exist, and lost all their on site and off site and tape drive backups...the transfer agent still knows how many shares you have.
Second, SIPC protects your assets in the event TDA ceases to operate. SIPC coverage is more than enough to cover your current assets. However, over time you're going to exceed their limits. TDA has excess SIPC coverage, via private insurance:
TD Ameritrade, Inc. is a member of the Securities Investor Protection
Corporation (SIPC). Securities in your account protected up to
$500,000, which includes a $250,000 limit for cash. For details,
please see www.sipc.org.
Additionally, TD Ameritrade provides each client $149.5 million worth
of protection for securities and $2 million of protection for cash
through supplemental coverage provided by London insurers. In the
event of a brokerage insolvency, a client may receive amounts due from
the trustee in bankruptcy and then SIPC. Supplemental coverage is paid
out after the trustee and SIPC payouts and under such coverage each
client is limited to a combined return of $152 million from a trustee,
SIPC, and London insurers.
The TD Ameritrade supplemental coverage has an aggregate limit of $500
million over all customers. This policy provides coverage following
brokerage insolvency and does not protect against loss in market value
of the securities.
Third, TDA backs up their data intra-day and has multiple levels of backups (hourly, daily, weekly, etc). They have backups retained on different electrical grids so they can still access them in the event of a regional blackout. They have backups retained in different physical locations so they can still access them in the event of an earthquake, tornado, hurricane, etc. While they could be hacked and could in theory have a ransomware type of event, this would result in an inconvenience to you...and only if you happened to want to do something while they were mitigating the attack.