I’ve over-nighted in T8 a couple of times with my wife, we felt quite safe and no problems re-checking in bags or getting through security.
One time we even arrived JFK around 2pm, dropped the bags ready for the onward flight, went into the city and came back about 11pm, through security and waited for the lounge to open before our 6am flight. It’s not overly comfortable and you may have to move around to keep out of the way of the cleaners but there are few enough people there to be able to find a quiet corner but enough people to feel safe. It’s after security so everyone else is either working or in the same situation.