Do you think it will be more enjoyable if we play the Visual Naval Video Game before this game?
That is a great idea and you will miss like 99% of the references if you don't.
Honestly though that's a big time investment just to play a porn game

You will need to play the first 3 games (Ace Attorney, Justice for all and Trials & Tribulations) to get to the relevant point in the time line.
That's easily 100 hours of gameplay time.
Also I have noticed some things that reference the later games.
I still recommend it though because honestly the Ace Attorney series is simply incredible. I played the games like 4 or 5 times already. It's a really great story but it's 90% reading a visual novel and only about 10% using logic to solve puzzles, murders & solve the case. So if you dislike visual novels & reading then it's not for you. If you enjoy these things then this is actually a must play series.
I recommend using drastic and downloading the old DS roms and playing it on your smartphone. It's imo still the best way to enjoy the series since you can speed up text.
If you like it slow and want to take your time I think the Ace Attorney trilogy with the newer and very good looking HD sprites (featuring the first 3 games) is only 6 bucks if you buy a Steam-Key from a reseller. 6 Bucks for 3 great games and 100+ hours of gameplay time is worth it.
Don't make the mistake of buying it directly from steam though, it still costs 30 bucks which is 5 times more.
If you hate this type of game though do not bother with it. You will not enjoy these 100 hours...
also there is always the anime where they condense a 10 hour case into a 20 minute episode. I hated the Anime but I guess it's barely enough to get to know the characters so you get most of the relations and references in the game?