The answer lies in the first verse of the same verses in 1 Kings quoted above.
"Now King David was old and stricken in years; and they covered him with clothes, but he could get no heat." (1 Kings 1:1)
David was an frail man at this point. He couldn't touch a woman "affectionately" (b'derech chiba) if he tried!
The fourth verse explicitly tells us that there was no romantic encounter between David and his live-in nurse.
"And the damsel was very fair; and she became a companion unto the king, and ministered to him; but the king knew her not." (1 Kings 1:4)
The law of nagia is the same today. No one thinks twice about a young woman, working in a nursing home, tending to an old, observant Jewish man. Yes, they touch. She might even give him a sponge bath, and see his private areas; but the vast majority of old men who can no longer bathe themselves, are also incapable of any intimate relations, forbidden or permitted.
Therefore, one cannot bring a proof from these verses that the laws of nagia were different then than they are now.