I'm presuming by "place on the SD card" you mean in the vfat partition because you intend to do this with, eg., a windows machine that can't access the rest of the card -- but it doesn't actually matter where you put it.
am I going to create problem in the boot process?
Wouldn't that apply to any method in the sense that you probably could cause a problem by mistake, ie., if you did it wrong? So the question is more like "Can this be done in a manner that doesn't create a problem?", and just based on the fact that it works for the ssh file implies yes, of course it can.
The boot partition is certainly available when the system starts as it is mounted by default, so it is in fact very easy to create a service that makes use of files there, and the possibility of causing a problem with the boot process is pretty much the same as for any boot service: Yes, you can mess thing up if you do things the wrong way.
Is there any other solution to this?
I think that depends on what exactly it is you want to do, but in my opinion there probably isn't a much better way if it is about customizing some configuring on first boot. It's simple, which is an important virtue WRT to tech projects.
That said, if accessing the root fs in the second partition isn't a problem, and this is about static configuration, eg., providing a
wpa_supplicant.conf, you could instead automate doing that directly, ie., rather than a process which applies configuration on first boot, you write something to do the same thing before first boot by putting the card in another machine.
That second option is probably even simpler than the first but depends on accessing the second partition and whether the system has to be running to do what you want.