I'm pretty sure "second party" isn't even an official term.
You're correct, it's not.
Normally, the hired person or company in a contract might think they're first party, and the client is the second, and vice versa. The two are actually interchangeable.
In the context of games though, second party generally is used to describe companies who are bound under contract to do something for a console manufacturer, but are not necessarily owned by them. Like Game Freak.
IMO, the term should be dropped, as it obviously confuses people and serves no real purpose. As far as I'm concerned, a company like Game Freak is just a third party company who just happens to make Pokémon games for Nintendo. It's no different to how Koei Tecmo now make Hyrule Warriors, or how Insomniac Games make games for Sony but also occasionally on Xbox.
Second party is just a colloquial term gamers came up with to describe companies who become known for always making installments in certain franchises for a first party company.
There's also the fact that third party companies, like say, SEGA, can license their IPs out too. So say, Sonic & SEGA All-Stars Racing - IP is obviously owned by SEGA, and they license it to Sumo Digital to develop the game. In this case, SEGA might see themselves as the first party, and Sumo as the second. And vice versa from Sumo's perspective.