80-26 says the employer can make a no-interest loan (has to be no interest) to pay "operating expenses," which include benefit payments (e.g., they might include the RMDs). I don't think 80-26 specifically addresses investments, but I know the IRS position is that making an investment is not an "operating expense." Maybe payment of taxes on an existing investment is arguably a gray area. I don't believe the loan is required per se to be in writing, but DOL says that an unwritten loan would generally be imprudent, because there would be no documentation for the plan's repayment obligation to the employer.
If a loan, then not a contribution, so 415 not an issue, and of course not deductible. I guess IRS could try to as a disguised contribution, since a one-person plan and the loan, even if repaid, benefitted the participant since did not need to liquidate illiquid investments.
Sounds like a facts and circumstances thing, but based on what you described you're not clearly dead in water. Best thing to do would be to repay it promptly.