If for example a Spanish citizen happens to find two houses in two close cities that are close to each other (for example a French city and a Belgian city), applies for residency in both of them and manages somehow to afford rent costs and meet the work requirements in both countries (let's say for example he resides with him family in one country and pays rent on his own in the other one, and works part time in Belgium and part time in France, for a needed extension of time), and likewise also assuming that he manages not to let know each country's authorities about his own status in the other country (for example opening a bank account in a country exclusively with its own issued document, in order to avoid double taxation and using exclusively each document for its own territory), can he for example seek citizenship from both countries after 5 years (Belgium and France require 5 years for their citizenships)? Would it be legal to seek both citizenships in that case? In case this is illegal, how would he eventually be caught?
Since you mention France, the residence requirement for naturalisation has been interpreted as having the “center of your life” in France. For example, if you live in France and your spouse and children live abroad, naturalisation can be denied. It's deliberately not about meeting formal criteria (like spending a predefined number of days in France) but by definition excludes living a life split between two countries and gives the authorities and justice system complete flexibility to deal with such cases.
In practice, what happens during a naturalisation procedure is that you will at least have an interview with the police (probably an officer of the General Directorate for Internal Security) and the mayor of the town where you live will be asked for an opinion (in a small town, s/he might know you or inquire in person, in large city, they would typically mandate a social worker to pay a visit to your address). It's not a deep investigation but it might still be difficult to hide the fact you have a kind of double life to them.
Another way this could come back to haunt you is that if you run into some serious problem with the law (or even, possibly, with a private citizen who has reasons to report you to the authorities) at a later point. It's entirely possible for the original decision to be invalidated as fraudulent. At this point, any action you took to dissimulate your true situation (like failing to report income or opening two bank accounts) only make matters worse as they establish fraudulent intent.