Is the impact factor the sole criteria for selecting journals?
I think impact factor should be almost at the bottom of considerations of how to choose a journal. If you want to read more I suggest this nature article.
The first test should be to make sure you are submitting to a journal of good standing. For example you may want to ask is it a predatory journal.
Once that's out of the way then I think the most important thing is your choice depends on who you want your audience to be. You've suggested journals in different fields - this is now your choice. Different journals have different audiences from different communities. In my work, some journals lend themselves to more theoretical work whereas some prefer more practical implementations and applications.
There are some other considerations which I think you might consider too:
You may also want to bring your work to the attention of one of the editors. This might be someone you want to work with in future for example.
You should also think if there is a good fit to your work. Acceptance is not guaranteed for any work. You should have a look at the scope of each journal and see if your work fits.
Finally, you may want to consider how fast the journal processes articles - how long is it from when you submit your work to a potential publication. Early in your career this might be an important factor too.